← Inbox

C3D-LN478 · Line S05-11-22W 29.89 from pt 478 done

Single boundary line from IPF #478

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

C# payload

// Line from pt 478 (IPF 2166609.127,1330752.555): S05-11-22W 29.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 = (5 + 11.0/60 + 22.0/3600) * d2r, dist = 29.89;
var s = new Point3d(2166609.127, 1330752.555, 0);
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($"Line S05-11-22W 29.89 from pt478 -> ({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-LN478 (0 entities touched).
Entities
Duration
570 ms
Civil 3D
25.0.0.0

Log

Line S05-11-22W 29.89 from pt478 -> (2166606.423,1330722.788) h=20C37

Notes

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

No notes yet.