Making Polylines

Making Polylines

Anonymous
Not applicable
255 Views
2 Replies
Message 1 of 3

Making Polylines

Anonymous
Not applicable
Hi, I have posted this in the past but I have never been able to create a descent solution in VBA. I still using my Lisp apps to create polylines. Is there a way of selecting a group of lines and converting them into polylines, like in Lisp (command "_pedit" ele "_Y" "_J" ss "" ""). I have manage to create polylines by selecting the lines, gathering the points and then deleting the org. lines and finally creating the polylines. My biggest problem with the approach is that sometimes I have a bunch of lines that are supposed to be grouped into say three diff. polylines, some closed and other opened. Here is when I normally quit and go back to Lisp. Does AC2005 or AC2006 when available have an easier polyline creation method? TIA
0 Likes
256 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Select the lines and run this (the SendCommand statement is all on one
line and uses the 'previous' selection):

Sub ConvertLines()
ThisDrawing.SendCommand "_pedit" & vbCr & "m" & vbCr & "p" & vbCr &
vbCr & "y" & vbCr & "j" & vbCr & vbCr & vbCr
End Sub

HJohn wrote:
> Hi, I have posted this in the past but I have never been able to create a descent solution in VBA. I still using my Lisp apps to create polylines. Is there a way of selecting a group of lines and converting them into polylines, like in Lisp (command "_pedit" ele "_Y" "_J" ss "" ""). I have manage to create polylines by selecting the lines, gathering the points and then deleting the org. lines and finally creating the polylines. My biggest problem with the approach is that sometimes I have a bunch of lines that are supposed to be grouped into say three diff. polylines, some closed and other opened. Here is when I normally quit and go back to Lisp. Does AC2005 or AC2006 when available have an easier polyline creation method? TIA
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank you. Late, but I just read it. I didn't know this solution existed, previous selection set. After putting it up for so many times, I finally decided to give it a try and yesterday I finished my own solution. It works great, but It took me two days to do it. Only when I finished, I decided to look again to see if there were any replies. I think I will use you solution, so thank you again.
0 Likes