← Inbox

C3D-LN2 · Line S89-10-36E 55.89 done

Continue boundary from prior line end

Script file
C3D-LN2.cs
Target
active document · model space
Author
claude
Approved
yes · claude (session)
Timeout
60s

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

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-LN2 (0 entities touched).
Entities
Duration
450 ms
Civil 3D
25.0.0.0

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.