Jump to content

Is it possible to delete all straights polylines with lisp ?


sergiu_ciuhnenco

Recommended Posts

can not find a lisp for deleting all the straights polylines .
I think is posible in 2 ways , to find all polyline that contains only 3 verticle, or to select all and deselect the polylines that contains arc.
Thanks in advance !!!
 

Test.dwg

Link to comment
Share on other sites

(ssget "_X" '((0 . "*POLYLINE") (-4 . "<") (90 . 3)))
this is how I found to select all polylines less than 3 vertex


 

Link to comment
Share on other sites

So this will delete polylines with 2 points, straight be default, but not one with more points that are in a straight line.

 

I think you have to entget each polyline (via ssget), and examine if any has a value for code 42, curve. and discard them, of if you want just a straight line I think you would have to work out the angle between adjacent pairs of points, if they are all the same it is a straight line

Link to comment
Share on other sites

Thanks " devitg ", like you mentioned is sufficient for me that you write !!!
accepted like solution !
Thanks one more time !
Very receptive community !!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...