← Inbox

C3DO-0758 · 261101: legend - drop inlet symbol onto its line [C3D-LEGEND4] done

Move the one symbol C3DO-0757 missed (the drop inlet / catch basin, 2191F) down onto the DROP INLET line.

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

C# payload

ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64("2191F",16)),out id);
var mt=(MText)Tx.GetObject(new Func<ObjectId>(()=>{ ObjectId m; Db.TryGetObjectId(new Handle(Convert.ToInt64("2191D",16)),out m); return m; })(),OpenMode.ForRead);
double di=0; var c=new DBObjectCollection(); mt.Explode(c); foreach(Autodesk.AutoCAD.DatabaseServices.DBObject o in c){ var t=o as DBText; if(t!=null&&t.TextString.Trim()=="DROP INLET") di=t.Position.Y; o.Dispose(); }
var b=(BlockReference)Tx.GetObject(id,OpenMode.ForWrite); var x=b.GeometricExtents; double cy=(x.MinPoint.Y+x.MaxPoint.Y)/2, dy=(di+0.045)-cy;
if(Math.Abs(dy)<0.05){ Log("drop inlet symbol already on its line"); return; }
b.TransformBy(Matrix3d.Displacement(new Vector3d(0,dy,0))); x=b.GeometricExtents;
Log("drop inlet symbol "+b.Name+" moved "+dy.ToString("F4")+", center now "+((x.MinPoint.Y+x.MaxPoint.Y)/2).ToString("F4")+" vs DROP INLET baseline "+di.ToString("F4")+" (verified)");
Ed.Regen();

Result

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

Log

drop inlet symbol Catch Basin moved -0.3164, center now 8.0395 vs DROP INLET baseline 7.9945 (verified)

Notes

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

No notes yet.