← Inbox

C3DO-0723 · 261101 tract labels off the buildings done

From the plot review: TRACT A area label ran through the west building and TRACT B through the east building outline. TRACT A moved below the stall rows parallel to the south line, TRACT B centred in the strip between the north line and the building, both 2.5 ft.

Script file
C3DO-0723.cs
Target
261101 - 5491 Roswell Rd NE.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
foreach(ObjectId id in ms){ var t=Tx.GetObject(id,OpenMode.ForRead) as DBText; if(t==null||t.Layer!="V-TEXT") continue;
 if(t.TextString.StartsWith("TRACT A")){ t.UpgradeOpen(); t.Height=2.5; t.HorizontalMode=TextHorizontalMode.TextCenter; t.VerticalMode=TextVerticalMode.TextVerticalMid; t.AlignmentPoint=new Point3d(2232470.0,1420487.0,0); t.Rotation=6.765*Math.PI/180; t.AdjustAlignment(Db); var e=t.GeometricExtents; Log("TRACT A label moved off the west building, below the stall rows along the south line: x "+e.MinPoint.X.ToString("F0")+"-"+e.MaxPoint.X.ToString("F0")+" y "+e.MinPoint.Y.ToString("F0")+"-"+e.MaxPoint.Y.ToString("F0")); }
 if(t.TextString.StartsWith("TRACT B")){ t.UpgradeOpen(); t.Height=2.5; t.HorizontalMode=TextHorizontalMode.TextCenter; t.VerticalMode=TextVerticalMode.TextVerticalMid; t.AlignmentPoint=new Point3d(2232490.0,1420630.9,0); t.Rotation=4.62*Math.PI/180; t.AdjustAlignment(Db); var e=t.GeometricExtents; Log("TRACT B label centred in the strip between the north line and the east building: x "+e.MinPoint.X.ToString("F0")+"-"+e.MaxPoint.X.ToString("F0")+" y "+e.MinPoint.Y.ToString("F0")+"-"+e.MaxPoint.Y.ToString("F0")); } }
Ed.Regen();

Result

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

Log

TRACT A label moved off the west building, below the stall rows along the south line: x 2232407-2232533 y 1420477-1420496
TRACT B label centred in the strip between the north line and the east building: x 2232427-2232553 y 1420624-1420638

Notes

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

No notes yet.