Code Red => AutoLISP (Vanilla / Visual) => Topic started by: teslaxx on March 26, 2021, 08:07:47 AM
Title: How to select all lines based on the angle?
Post by: teslaxx on March 26, 2021, 08:07:47 AM
Hello!
I would like to delete all lines in a Autocad File based on a filter: the angle of the line.
I found the qselect command and it's very useful, but it doesn't search on all layouts
What would be my options regarding this?
Title: Re: How to select all lines based on the angle?
Post by: Stefan on March 26, 2021, 10:30:57 AM
Welcome to the swamp
No native function ready to use and no dxf filters available for this task. You have to build your own function. Select all lines, iterate the selection and eliminate the ones that doesn't match the required angle.
Something like this for creating the selection (with a minimum effort you can edit the lisp to delete them):
Title: Re: How to select all lines based on the angle?
Post by: teslaxx on March 29, 2021, 02:05:16 AM
Thank you a lot for your help, but, it still doesn't select the lines on ALL LAYOUT, only the current layout. It probably need just an additional line.
Title: Re: How to select all lines based on the angle?
Post by: Stefan on March 29, 2021, 09:56:12 AM
It does select from all Layouts, but if you use any native Autocad command on the selection, only the objects in the current space are processed. You need to program your command to work on all objects. If you want to delete them, ERASE is not working, (entdel <ename>) is not working, but (vla-delete <vla-object>) will do the trick.
Title: Re: How to select all lines based on the angle?
Post by: ribarm on June 28, 2022, 12:20:07 AM
@teslaxx, We should say it never give up, never fall down... Nice lightings... God is trusting beeing or not ??? Playing Gods on Earth or playing deaths on Dantuin...