← Inbox

C3DO-0756 · 261101 legend positions (read-only) [C3D-LEGPROBE2] done

Read-only: legend text line positions and the symbol/sample pieces on 11X17.

Script file
C3DO-0756.cs
Target
261101 - 5491 Roswell Rd NE R2.dwg · model space
Author
claude
Approved
yes · read-only
Timeout
60s

C# payload

Func<string,ObjectId> oid=hs=>{ ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64(hs,16)),out id); return id; };
var mt=(MText)Tx.GetObject(oid("2191D"),OpenMode.ForRead); var sp=(BlockTableRecord)Tx.GetObject(mt.OwnerId,OpenMode.ForRead);
Log("MText loc "+mt.Location+" ext "+mt.GeometricExtents.MinPoint+"-"+mt.GeometricExtents.MaxPoint+" owner "+((Layout)Tx.GetObject(sp.LayoutId,OpenMode.ForRead)).LayoutName);
var c=new DBObjectCollection(); mt.Explode(c); foreach(Autodesk.AutoCAD.DatabaseServices.DBObject o in c){ var t=o as DBText; if(t!=null) Log("  frag "+t.Position.X.ToString("F3")+","+t.Position.Y.ToString("F4")+" '"+t.TextString+"'"); o.Dispose(); }
var lays=new HashSet<string>{"BLOCK_LEGEND","C-PROP-LINE","V-GIS-PROP-ADJ","SS-V-ROAD-CNTR","X-ESMT-STRM","SS-BUFFER SETBACK"};
foreach(ObjectId id in sp){ var e=(Autodesk.AutoCAD.DatabaseServices.Entity)Tx.GetObject(id,OpenMode.ForRead); if(!lays.Contains(e.Layer)||id==mt.ObjectId) continue; try{ var x=e.GeometricExtents; Log("E "+e.Handle+" "+e.GetType().Name+" "+e.Layer+" "+x.MinPoint.X.ToString("F3")+","+x.MinPoint.Y.ToString("F3")+" - "+x.MaxPoint.X.ToString("F3")+","+x.MaxPoint.Y.ToString("F3")); }catch{} }

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE R2.dwg
Message
Executed C3DO-0756 (0 entities touched).
Entities
—
Duration
419 ms
Civil 3D
25.0.0.0

Log

MText loc (11.835171604997155,11.322664572176716,0) ext (11.835171604997155,8.7427810806509,0)-(14.523185931672034,11.322664572176716,0) owner 11X17
  frag 11.826,11.2227 'IPF IRON PIN FOUND'
  frag 11.826,11.0640 'IPP IRON PIN PROPOSED'
  frag 11.826,10.8862 'R/W RIGHT OF WAY'
  frag 11.826,10.7285 'RWM RIGHT OF WAY MARKER'
  frag 11.826,10.5698 'MAG MAGNETIC'
  frag 11.826,10.4111 'POB POINT OF BEGINNING'
  frag 11.826,10.2524 'POC POINT OF COMMENCEMENT'
  frag 11.826,10.0747 'B/L BUILDING LINE'
  frag 11.826,9.9169 'D.E. DRAINAGE EASEMENT'
  frag 11.826,9.7392 'N/F NOW OR FORMERLY'
  frag 11.826,9.5814 'L.L. LAND LOT'
  frag 11.826,9.4227 'PP POWER POLE'
  frag 11.826,9.2640 'IPS IRON PIN SET'
  frag 11.821,9.1053 'OTP OPEN TOP PIPE'
  frag 11.821,8.9466 'CTP CRIMP TOP PIPE'
  frag 11.826,8.7879 'DB DEED BOOK'
  frag 11.826,8.6292 'PB PLAT BOOK'
  frag 11.826,8.4705 'FF FINISHED FLOOR'
  frag 11.826,8.3119 'RBF REBAR FOUND'
  frag 11.830,8.1532 'WM WATER METER'
  frag 11.835,7.9945 '   DROP INLET'
  frag 11.835,7.8358 '   WATER VALVE'
  frag 11.835,7.6771 '   SEWER MANHOLE'
  frag 11.835,7.5184 '   FIRE HYDRANT'
  frag 11.835,7.3597 '   ELEVATION POINT'
  frag 11.835,7.2010 '   PROPERTY CORNER'
  frag 11.835,7.0423 '   FENCE'
  frag 11.835,6.8837 '   POWER POLE'
  frag 11.835,6.7250 '   GAS METER'
  frag 11.835,6.5663 '   BOUNDARY LINE'
  frag 11.835,6.4076 '   ADJOINER LINE'
E 2191C DBText BLOCK_LEGEND 5.568,6.780 - 6.116,6.859
E 2191E BlockReference BLOCK_LEGEND 11.869,8.125 - 11.980,8.275
E 2191F BlockReference BLOCK_LEGEND 11.862,8.293 - 11.987,8.418
E 21920 BlockReference BLOCK_LEGEND 11.862,7.978 - 11.987,8.103
E 21921 BlockReference BLOCK_LEGEND 11.857,7.825 - 11.992,7.950
E 21922 BlockReference BLOCK_LEGEND 11.852,7.671 - 11.997,7.796
E 21923 Circle BLOCK_LEGEND 11.892,7.539 - 11.956,7.602
E 21924 Line BLOCK_LEGEND 11.864,7.449 - 12.065,7.482
E 21925 Line BLOCK_LEGEND 11.955,7.466 - 11.965,7.487
E 21926 Line BLOCK_LEGEND 11.955,7.444 - 11.974,7.487
E 21927 Line BLOCK_LEGEND 11.965,7.444 - 11.974,7.465
E 21928 Line BLOCK_LEGEND 11.965,7.465 - 11.985,7.481
E 21929 Line BLOCK_LEGEND 11.946,7.451 - 11.985,7.481
E 2192A Line BLOCK_LEGEND 11.876,7.454 - 11.895,7.496
E 2192B Line BLOCK_LEGEND 11.886,7.454 - 11.895,7.475
E 2192C Line BLOCK_LEGEND 11.867,7.464 - 11.906,7.495
E 2192D Line BLOCK_LEGEND 12.032,7.433 - 12.052,7.475
E 2192E Line BLOCK_LEGEND 12.022,7.439 - 12.062,7.469
E 2192F Line BLOCK_LEGEND 11.820,7.352 - 12.094,7.401
E 21930 Circle BLOCK_LEGEND 11.870,7.517 - 11.978,7.624
E 21931 Line BLOCK_LEGEND 11.849,7.411 - 11.882,7.418
E 21932 Line BLOCK_LEGEND 11.841,7.372 - 11.874,7.378
E 21933 Line BLOCK_LEGEND 11.841,7.378 - 11.849,7.418
E 21934 Line BLOCK_LEGEND 11.874,7.372 - 11.882,7.411
E 21935 Line BLOCK_LEGEND 11.937,7.393 - 11.970,7.399
E 21936 Line BLOCK_LEGEND 11.929,7.354 - 11.962,7.360
E 21937 Line BLOCK_LEGEND 11.929,7.360 - 11.937,7.399
E 21938 Line BLOCK_LEGEND 11.962,7.354 - 11.970,7.393
E 21939 Line BLOCK_LEGEND 12.021,7.377 - 12.054,7.383
E 2193A Line BLOCK_LEGEND 12.013,7.337 - 12.046,7.343
E 2193B Line BLOCK_LEGEND 12.013,7.343 - 12.021,7.383
E 2193C Line BLOCK_LEGEND 12.046,7.337 - 12.054,7.377
E 2193D BlockReference BLOCK_LEGEND 11.859,7.220 - 11.990,7.272
E 2193E BlockReference BLOCK_LEGEND 11.869,7.044 - 11.980,7.194
E 2193F Line C-PROP-LINE 11.820,6.929 - 12.094,6.929
E 21940 Line V-GIS-PROP-ADJ 11.820,6.770 - 12.094,6.770

Notes

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

No notes yet.