Iterate through polyline segments using lisp

Iterate through polyline segments using lisp

prgmdl
Contributor Contributor
963 Views
24 Replies
Message 1 of 25

Iterate through polyline segments using lisp

prgmdl
Contributor
Contributor

Hi

 

How to iterate each segments of a 2d polyline to get properties using lisp? Thanks

0 Likes
Accepted solutions (1)
964 Views
24 Replies
Replies (24)
Message 21 of 25

prgmdl
Contributor
Contributor

Hi @ВeekeeCZ ,

 

The lisp works, thank you. Also, if i's not too much to ask, how do I get the arc radius if the polyline contains an arc segment? 

 

EDIT: something like this?

prgmdl_0-1744722114909.png

 

0 Likes
Message 22 of 25

prgmdl
Contributor
Contributor

I will use the value to create an offset for individual segments of the polyline. I also just encountered where a polyline contains an arc, and I would like to get the radius or the point locaiton of its midpoint to recreate it another software.

0 Likes
Message 23 of 25

ВeekeeCZ
Consultant
Consultant

Radius must be calculated from the bulge and endpoints. See HERE 

Message 24 of 25

Sea-Haven
Mentor
Mentor

Google "point location of pline midpoint autolisp" pretty sure have seen a post about this recently here.

Message 25 of 25

prgmdl
Contributor
Contributor

Hi @ВeekeeCZ, I was trying to do this now in VBA but somehow the GetWidth does not work, do you know how to do the same code using VBA?

0 Likes