Community
Hello,
I need to determine and extract the coordinates of the start and end point of the alignment.
Can someone help me with an example .net code.
Thank you very much.
Best regards.
Mauro Vega
AutoCAD Civil 3D 2018.1
Intel Core i7-6700HQ CPU 2.6 GHZ
32 GB RAM 2133 MHz
NVIDIA Quadro M3000M
Windows 10 Pro 64 Bits
Solved! Go to Solution.
Solved by sybold. Go to Solution.
this should get you on your way,
'' autocad Dim doc As Document = Core.Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Dim ed As Editor = doc.Editor Dim trans As Transaction = db.TransactionManager.StartTransaction '' civil Dim cdoc As CivilDocument = CivilApplication.ActiveDocument '' select alignment Dim promptentop As New PromptEntityOptions(vbLf + "select alignment") promptentop.SetRejectMessage("no alignment") promptentop.AddAllowedClass(GetType(Alignment), True) promptentop.AllowNone = False Dim promptentres As PromptEntityResult = ed.GetEntity(promptentop) If promptentres.Status <> PromptStatus.OK Then ed.WriteMessage(vbLf + "error, no alignment") End If Dim alm As Alignment = trans.GetObject(promptentres.ObjectId, OpenMode.ForRead) '' alignment stuff Dim start As Point3d = alm.StartPoint
Can't find what you're looking for? Ask the community or share your knowledge.