← Inbox

C3D-LINEONLY · Line 479->506 (line only) done

Just the line on SS-V-LINE. Label it by hand with ADDSEGMENTLABEL.

Script file
C3D-LINEONLY.cs
Target
C:\Users\sanja\OneDrive\_SurveyDisco\260619 - 3625 Stonewall Tell Rd, Atlanta, GA 30349, USA\260619 - 3625 Stonewall Tell Rd.dwg · model space
Author
claude
Approved
yes · reviewer
Timeout
60s

C# payload

var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
var cps = CivilDoc.CogoPoints;
Point3d? a = null, b = null;
foreach (ObjectId id in cps) {
    var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id, OpenMode.ForRead);
    if (cp.PointNumber == 479) a = new Point3d(cp.Easting, cp.Northing, 0);
    if (cp.PointNumber == 506) b = new Point3d(cp.Easting, cp.Northing, 0);
}
if (a == null || b == null) { Log("479/506 not found"); return; }
EnsureLayer("SS-V-LINE", 3);
var ln = new Line(a.Value, b.Value) { Layer = "SS-V-LINE" };
ms.AppendEntity(ln); Tx.AddNewlyCreatedDBObject(ln, true);
Log($"line 479->506 drawn len={ln.Length:F2} h={ln.Handle}");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260619 - 3625 Stonewall Tell Rd, Atlanta, GA 30349, USA\260619 - 3625 Stonewall Tell Rd.dwg
Message
Executed C3D-LINEONLY (0 entities touched).
Entities
Duration
337 ms
Civil 3D
25.0.0.0

Log

line 479->506 drawn len=154.07 h=20E8C

Notes

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

No notes yet.