← Inbox

C3D-0508 · Place CHRISTMAS AVE (100 R/W) label following road [C3D-0509] done

New DBText CHRISTMAS AVE (100 R/W) rotated 79.9deg to follow the frontage boundary edge, on new layer V-ROAD-TEXT. Leaves existing anno untouched.

Script file
C3D-0508.cs
Target
812 Christmas Ave.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var lt=(LayerTable)Tx.GetObject(Db.LayerTableId,OpenMode.ForWrite);
if(!lt.Has("V-ROAD-TEXT")){ var l=new LayerTableRecord{Name="V-ROAD-TEXT",Color=Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci,3)}; lt.Add(l); Tx.AddNewlyCreatedDBObject(l,true); }
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
var t=new DBText();
t.TextString="CHRISTMAS AVE (100' R/W)";
t.Height=8.0;
t.Rotation=1.3950416711190678;
t.HorizontalMode=TextHorizontalMode.TextMid; t.VerticalMode=TextVerticalMode.TextVerticalMid;
t.Position=new Point3d(2433982.7,1429481.5,0);
t.AlignmentPoint=new Point3d(2433982.7,1429481.5,0);
t.Layer="V-ROAD-TEXT";
ms.AppendEntity(t); Tx.AddNewlyCreatedDBObject(t,true);
Log("placed road label rot="+(t.Rotation*180/System.Math.PI).ToString("F1")+" h="+t.Handle);
Ed.Regen();

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260903 - 812 Christmas Ave, Bethlehem, GA 30620, USA\812 Christmas Ave.dwg
Message
Executed C3D-0508 (0 entities touched).
Entities
—
Duration
530 ms
Civil 3D
25.0.0.0

Log

placed road label rot=79.9 h=22A47

Notes

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

No notes yet.