C3D-0498 · Find vicinity raster + flood/firm labels 260714 (read-only) [C3D-0499] error
Locate the vicinity map raster (size/placement) and any FLOOD/FEMA/FIRM labels on each layout to place a matching FEMA map beside it.
C# payload
var lm=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
foreach(System.Collections.DictionaryEntry de in lm){ string ln=(string)de.Key; if(ln=="Model") continue; var lay=(Layout)Tx.GetObject((ObjectId)de.Value,OpenMode.ForRead); var ps=(BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId,OpenMode.ForRead);
foreach(ObjectId eid in ps){ var e=Tx.GetObject(eid,OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if(e is RasterImage ri){ var o=ri.Orientation; string defn="?"; if(!ri.ImageDefId.IsNull){ var d=(RasterImageDef)Tx.GetObject(ri.ImageDefId,OpenMode.ForRead); defn=d.SourceFileName; } Log(ln+" RASTER h="+ri.Handle+" ll="+o.Origin.X.ToString("F3")+","+o.Origin.Y.ToString("F3")+" W="+o.Xaxis.Length.ToString("F3")+" H="+o.Yaxis.Length.ToString("F3")+" def="+defn); }
string s=null; if(e is DBText t) s=t.TextString; else if(e is MText m) s=m.Contents; if(s!=null && (s.ToUpper().Contains("VICINITY")||s.ToUpper().Contains("FLOOD")||s.ToUpper().Contains("FEMA")||s.ToUpper().Contains("FIRM"))){ Log(ln+" TEXT h="+e.Handle+" '"+s.Replace((char)34,"").Substring(0,System.Math.Min(60,s.Length))+"'"); }
}
}
Result
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.