polyline coordinates ???

polyline coordinates ???

Anonymous
Not applicable
360 Views
5 Replies
Message 1 of 6

polyline coordinates ???

Anonymous
Not applicable
Hi,

i'm trying to get the coordinates of a polyline which i have selected via the selectonscreen method. but the properties coordinates and coordinate don't work !?! i'm working with autocad 2000i

please help !
0 Likes
361 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
sorry don't have 2000i to check, but this works in 2002 and I'm pretty sure it should work in 2000 also. Function GetVerts(opline As AcadObject) As Variant Dim vertlist As Variant If TypeOf opline Is AcadPolyline Or TypeOf opline Is AcadLWPolyline Then vertlist = opline.Coordinates Else MsgBox "Sorry, object passed to GetVerts wasn't a polyline" End If GetVerts = vertlist End Function "Joldy" wrote in message news:29681590.1079597271896.JavaMail.jive@jiveforum2.autodesk.com... > Hi, > > i'm trying to get the coordinates of a polyline which i have selected via the selectonscreen method. but the properties coordinates and coordinate don't work !?! i'm working with autocad 2000i > > please help !
0 Likes
Message 3 of 6

Anonymous
Not applicable
thank you Mark (two times)

but i've find my solution. it was under my eyes !!!!!
i've used:

Dim entry as acadlwpolyline
Dim sset as AcadSelectionSet

Set sset = ThisDrawing.SelectionSets.Add("voile")
sset.SelectOnScreen

for each entry in sset
msgbox "" & entry.coordinates(0) & "," & entry.coordinates(1) etc...
Next entry

Maybe it's not very beautiful but it works (with coordinates)
I don't how i've missed that !?! 😛
0 Likes
Message 4 of 6

Anonymous
Not applicable
glad you got it working "Joldy" wrote in message news:13634549.1079699550694.JavaMail.jive@jiveforum2.autodesk.com... > thank you Mark (two times) > > but i've find my solution. it was under my eyes !!!!! > i've used: > > Dim entry as acadlwpolyline > Dim sset as AcadSelectionSet > you realize you will need to check for existence of sel set with error trap here > Set sset = ThisDrawing.SelectionSets.Add("voile") > sset.SelectOnScreen > and here unless you filtered the selection set, many object won't have .coordinates property so again error trap is required > for each entry in sset > msgbox "" & entry.coordinates(0) & "," & entry.coordinates(1) etc... > Next entry > you probably realized that but just in case...
0 Likes
Message 5 of 6

Anonymous
Not applicable
Yes i've realized i need to check for existence of selection set and it's my new challenge 😛

i don't need to check the second time 'cause all my objects in my draw are lwpolyline. so each have .coordinates .

thanks again
Joldy vs Computer Round 4
0 Likes
Message 6 of 6

Anonymous
Not applicable
Challenge completed !!
0 Likes