← Inbox

C3D-LN521 · Line S13-41-11W 734.86 from pt 521 done

Boundary line from pt 521

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

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

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

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.