← Inbox

C3D-0519 · Resize CHRISTMAS AVE label to h14 812 [C3D-0520] done

Erase h20 chars, place CHRISTMAS AVE (100 R/W) at h14 along the frontage arc on V-ROAD-TEXT.

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

C# payload


var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForWrite);
// erase all existing V-ROAD-TEXT DBText (the h20 set)
var kill=new System.Collections.Generic.List<ObjectId>();
foreach(ObjectId eid in ms){ if(eid.IsErased) continue; var t=Tx.GetObject(eid,OpenMode.ForRead) as DBText; if(t!=null&&t.Layer=="V-ROAD-TEXT") kill.Add(eid); }
foreach(var id in kill){ var e=(Autodesk.AutoCAD.DatabaseServices.Entity)Tx.GetObject(id,OpenMode.ForWrite); e.Erase(); }
Log("erased "+kill.Count+" old chars");
int n=0;
System.Action<string,double,double,double> addc=(ch,x,y,rot)=>{ var t=new DBText(); t.SetDatabaseDefaults(); t.TextString=ch; t.Height=14.0; t.Rotation=rot; t.Position=new Point3d(x,y,0); t.Layer="V-ROAD-TEXT"; ms.AppendEntity(t); Tx.AddNewlyCreatedDBObject(t,true); n++; };
addc("C",2433951.206900,1429364.508700,1.3325);
addc("H",2433953.657600,1429374.718700,1.337939);
addc("R",2433956.052800,1429384.941800,1.343378);
addc("I",2433958.392300,1429395.177900,1.348818);
addc("S",2433960.676100,1429405.426500,1.354257);
addc("T",2433962.904200,1429415.687300,1.359696);
addc("M",2433965.076400,1429425.960200,1.365136);
addc("A",2433967.192600,1429436.244700,1.370575);
addc("S",2433969.252900,1429446.540600,1.376014);
addc("A",2433973.205400,1429467.165100,1.386893);
addc("V",2433975.097400,1429477.493300,1.392332);
addc("E",2433976.933300,1429487.831500,1.397772);
addc("(",2433980.436100,1429508.537200,1.40865);
addc("1",2433982.103000,1429518.904000,1.414089);
addc("0",2433983.713500,1429529.279800,1.419529);
addc("0",2433985.267500,1429539.664100,1.424968);
addc("'",2433986.765000,1429550.056800,1.430407);
addc("R",2433989.590300,1429570.865800,1.441286);
addc("/",2433990.918100,1429581.281500,1.446725);
addc("W",2433992.189100,1429591.704200,1.452165);
addc(")",2433993.403500,1429602.133800,1.457604);
Log("placed "+n+" curved chars h14");
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-0519 (0 entities touched).
Entities
—
Duration
434 ms
Civil 3D
25.0.0.0

Log

erased 21 old chars
placed 21 curved chars h14

Notes

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

No notes yet.