C3D-LN521 · Line S13-41-11W 734.86 from pt 521 done
Boundary line from pt 521
C# payload
// Line from pt 521: S13-41-11W 734.86'
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
EnsureLayer("C-PROP-LINE");
var cp = (Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(CivilDoc.CogoPoints.GetPointByPointNumber(521), OpenMode.ForRead);
var s = new Point3d(cp.Easting, cp.Northing, 0);
double d2r = System.Math.PI / 180.0, ang = (13 + 41.0/60 + 11.0/3600) * d2r, dist = 734.86;
var e = new Point3d(s.X - dist * System.Math.Sin(ang), s.Y - dist * System.Math.Cos(ang), 0); // S..W
var ln = new Line(s, e); ln.Layer = "C-PROP-LINE";
ms.AppendEntity(ln); Tx.AddNewlyCreatedDBObject(ln, true);
Log($"pt521=({s.X:F3},{s.Y:F3}) S13-41-11W 734.86 -> ({e.X:F3},{e.Y:F3}) h={ln.Handle}");
Result
Log
pt521=(2166872.285,1330718.968) S13-41-11W 734.86 -> (2166698.412,1330004.974) h=20C3D
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.