Hi,
I am hoping someone can help me.
I am trying to extract all the points from a polyline so I can store them to reconstruct later.
I can draw the polyline but not get in the info out first.
This is doing my head in!
Thanks
Phil
#2
Hello,
Here is an example on how to extract the coordinates of a polyline:
Hope this helps!
Regards,
JCAMPOS
Here is an example on how to extract the coordinates of a polyline:
Code: Select all
Public Sub ShowLWPolylineCoordinates()
Dim doc As IntelliCAD.Document
Dim selEnt As IntelliCAD.entity
Dim pT1 As IntelliCAD.Point
Dim Ename As String
Set doc = IntelliCAD.ActiveDocument
doc.Utility.GetEntity selEnt, pT1, "Select a polyline: "
Ename = selEnt.EntityName
If Ename = "LightWeightPolyline" Then
Dim selPL As IntelliCAD.LWPolyline
Set selPL = selEnt
Dim ptTmp As IntelliCAD.Point
For Each ptTmp In selPL.Coordinates
MsgBox ptTmp.x & "x" & ptTmp.y & "x" & ptTmp.z
Next
End If
End Sub
Regards,
JCAMPOS