C3D-LINEONLY · Line 479->506 (line only) done
Just the line on SS-V-LINE. Label it by hand with ADDSEGMENTLABEL.
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
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.