C3D-LN2 · Line S89-10-36E 55.89 done
Continue boundary from prior line end
C# payload
// Continue from end of prior line (2166606.423,1330722.788): S89-10-36E 55.89'
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
EnsureLayer("C-PROP-LINE");
double d2r = System.Math.PI / 180.0, ang = (89 + 10.0/60 + 36.0/3600) * d2r, dist = 55.89;
var s = new Point3d(2166606.423, 1330722.788, 0);
var e = new Point3d(s.X + dist * System.Math.Sin(ang), s.Y - dist * System.Math.Cos(ang), 0); // S..E
var ln = new Line(s, e); ln.Layer = "C-PROP-LINE";
ms.AppendEntity(ln); Tx.AddNewlyCreatedDBObject(ln, true);
Log($"Line S89-10-36E 55.89 -> ({e.X:F3},{e.Y:F3}) h={ln.Handle}");
Result
Log
Line S89-10-36E 55.89 -> (2166662.307,1330721.985) h=20C3A
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.