← Inbox

C3D-0644 · COVER layout draw order (read-only) [C3D-COV] done

List non-text COVER paper-space entities in draw order with extents to find the flood map and vicinity map.

Script file
C3D-0644.cs
Target
260714 - 285 Huckaby Rd 22x17.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload

var ld=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
var lay=(Layout)Tx.GetObject(ld.GetAt("COVER"),OpenMode.ForRead);
var btr=(BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId,OpenMode.ForRead);
var dot=(DrawOrderTable)Tx.GetObject(btr.DrawOrderTableId,OpenMode.ForRead);
var ord=dot.GetFullDrawOrder(0); int i=0;
foreach(ObjectId id in ord){ i++; var e=(Autodesk.AutoCAD.DatabaseServices.Entity)Tx.GetObject(id,OpenMode.ForRead);
 if(e is DBText||e is Line||e is MText||e is Polyline2d||e is Arc) continue;
 string ex=""; try{ var b=e.GeometricExtents; ex=b.MinPoint.X.ToString("F2")+","+b.MinPoint.Y.ToString("F2")+" -> "+b.MaxPoint.X.ToString("F2")+","+b.MaxPoint.Y.ToString("F2"); }catch{}
 string nm=""; if(e is BlockReference) nm=((BlockReference)e).Name; if(e is RasterImage){ var ri=(RasterImage)e; try{ nm=((RasterImageDef)Tx.GetObject(ri.ImageDefId,OpenMode.ForRead)).SourceFileName; }catch{} }
 if(e is Viewport) nm="vp#"+((Viewport)e).Number;
 Log("#"+i+" "+e.GetType().Name+" h="+e.Handle+" L="+e.Layer+" "+nm+" ["+ex+"]"); }
Log("total in draw order: "+ord.Count);

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714 - 285 Huckaby Rd 22x17.dwg
Message
Executed C3D-0644 (0 entities touched).
Entities
—
Duration
788 ms
Civil 3D
25.0.0.0

Log

#3 BlockReference h=225B4 L=BLOCK_TB2 SS_BLOCK_17X11 [0.33,0.33 -> 16.67,10.67]
#4 Viewport h=225C3 L=0 vp#1 [-2.37,2.88 -> 13.50,8.77]
#5 Viewport h=225C6 L=BLOCK_TB2 vp#2 [-4.95,-2.19 -> -2.95,1.22]
#7 RasterImage h=226FD L=BLOCK_CLOSURE C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714-vicinity.png [12.60,3.54 -> 16.46,7.40]
#8 Ole2Frame h=22701 L=SS-BOUNDARY  [-0.03,8.49 -> 2.50,11.02]
#31 Polyline h=22A85 L=T-BLOCK  [17.96,-11.75 -> 49.25,10.88]
#44 Polyline h=22A92 L=T-BLOCK  [37.85,-3.12 -> 43.04,0.40]
#45 Polyline h=22A93 L=T-BLOCK  [18.32,7.51 -> 21.32,10.51]
#101 Polyline h=22ACB L=T-BLOCK  [31.68,-11.58 -> 36.64,-11.05]
#106 Hatch h=22AD0 L=T-BLOCK  [47.53,8.84 -> 47.74,9.06]
#107 Polyline h=22AD1 L=T-BLOCK  [47.53,8.84 -> 47.74,9.06]
#108 Polyline h=22AD2 L=T-BLOCK  [45.90,7.13 -> 49.25,10.88]
#125 Hatch h=22D34 L=T-BLOCK  [36.10,-9.03 -> 36.51,-8.59]
#126 Polyline h=22D35 L=T-BLOCK  [36.10,-9.03 -> 36.51,-8.59]
#163 Polyline h=22D5A L=T-BLOCK  [30.40,-10.63 -> 37.65,-2.44]
#169 Polyline h=22D60 L=T-BLOCK  [43.66,-3.36 -> 48.85,-0.71]
#209 Polyline h=22D88 L=NOTES  [41.23,5.06 -> 42.79,6.61]
#210 Polyline h=22D89 L=NOTES  [41.53,5.36 -> 42.49,6.32]
#211 Polyline h=22D8A L=NOTES  [41.27,5.10 -> 42.75,6.58]
#212 BlockReference h=22D8B L=NOTES SIGNATURE [40.99,5.75 -> 43.02,6.26]
#213 BlockReference h=22D8C L=NOTES SIGNATURE [39.00,6.50 -> 41.03,7.01]
#219 Polyline h=22D98 L=NOTES  [38.24,1.42 -> 38.53,1.87]
#220 Polyline h=22D99 L=NOTES  [38.58,1.48 -> 38.78,1.84]
#221 Polyline h=22D9A L=NOTES  [38.85,1.46 -> 39.03,1.77]
#222 Polyline h=22D9B L=NOTES  [39.08,1.32 -> 40.33,1.68]
#224 Ole2Frame h=22D9D L=1  [30.40,-10.66 -> 37.65,-2.44]
#243 RasterImage h=22F54 L=SS-BOUNDARY 5AC-C C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714-firmette.png [7.40,3.54 -> 11.38,7.40]
#259 Polyline h=22FA9 L=NOTES  [11.11,0.59 -> 11.40,1.05]
#260 Polyline h=22FAA L=NOTES  [11.45,0.65 -> 11.65,1.02]
#261 Polyline h=22FAB L=NOTES  [11.72,0.64 -> 11.90,0.95]
#262 Polyline h=22FAC L=NOTES  [11.95,0.50 -> 13.20,0.86]
#286 Ole2Frame h=244B3 L=SS-FLOODBOX  [7.40,3.54 -> 12.98,7.40]
#289 RasterImage h=244CE L=SS-FLOODBOX .\MARKUP\map.png [7.28,3.91 -> 13.61,7.00]
total in draw order: 289

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.