Message 1 of 3
Extracting coordinates from a LW Pline & a 2D Pline

Not applicable
08-08-2002
06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have the following code
Dim lineObj As AcadObject
Dim coord As Variant
ThisDrawing.Utility.GetEntity lineObj, basePnt, "Select Line"
MsgBox "One " & lineObj.EntityName & " selected"
coord = lineObj.Coordinate(1)
MsgBox "The coordinate in the first index position of the polyline is: "
& coord(0) & ", " _
& coord(1) & ", " & coord(2)
This works OK on a "AcDb2dPolyline" object (2D polyline) and a
"AcDb3dPolyline" object (3D polyline) but does not work when I select an
"AcDbPolyline" object (lightweight polyline).
How can I get the coordinates of a lightweight polyline and why does this
not work?.
Any assistance will be appreciated.
Regards
Sean Bartleet
I have the following code
Dim lineObj As AcadObject
Dim coord As Variant
ThisDrawing.Utility.GetEntity lineObj, basePnt, "Select Line"
MsgBox "One " & lineObj.EntityName & " selected"
coord = lineObj.Coordinate(1)
MsgBox "The coordinate in the first index position of the polyline is: "
& coord(0) & ", " _
& coord(1) & ", " & coord(2)
This works OK on a "AcDb2dPolyline" object (2D polyline) and a
"AcDb3dPolyline" object (3D polyline) but does not work when I select an
"AcDbPolyline" object (lightweight polyline).
How can I get the coordinates of a lightweight polyline and why does this
not work?.
Any assistance will be appreciated.
Regards
Sean Bartleet