Lisp explode all Except Line

Lisp explode all Except Line

Edwin.Saez
Advisor Advisor
2,035 Views
4 Replies
Message 1 of 5

Lisp explode all Except Line

Edwin.Saez
Advisor
Advisor

hi everyone!

 

Someone will have a lisp, that works just like the command "explode", but does not ask for a selection, but when running the command explode everything. It should also exclude exploiting the lines.

 

This code does what I need, but does not exclude the lines, Could someone change it?

 

(setvar "QAFLAGS" 1) (command "_.explode" (ssget "_X") "") (setvar "QAFLAGS" 0)

Edwin Saez


LinkedIn / AutoCAD Certified Professional


EESignature


 


Si mi respuesta fue una solución para usted, por favor seleccione "Aceptar Solución", para que también sirva a otro usuarios.

0 Likes
Accepted solutions (2)
2,036 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant
Accepted solution

@Edwin.Saez.Jamanca wrote:

... works just like the command "explode", but does not ask for a selection, but when running the command explode everything. It should also exclude exploiting the lines.

 

This code does what I need, but does not exclude the lines, Could someone change it?

 

(setvar "QAFLAGS" 1) (command "_.explode" (ssget "_X") "") (setvar "QAFLAGS" 0)

Another way:

 

(initcommandversion 2)
(command "_.explode" "_all" "")

 

BUT what do you mean by excluding the Lines?  They can't be Exploded anyway, so the above just counts them as among the things that it couldn't Explode [along with other kinds of things, such as plain Text, Circles, etc.].  Do you mean some other  kind of object(s), such as Polylines?  If so:

 

(initcommandversion 2)
(command "_.explode" (ssget "_X" '((0 . "~*POLYLINE"))) "")
Kent Cooper, AIA
Message 3 of 5

Edwin.Saez
Advisor
Advisor

@Kent1Cooper,

 

Thanks for the help, if it is working well.


I wanted to ask you if it could be included in a single line of code, excluding polylines and hatchs. it's possible?

Edwin Saez


LinkedIn / AutoCAD Certified Professional


EESignature


 


Si mi respuesta fue una solución para usted, por favor seleccione "Aceptar Solución", para que también sirva a otro usuarios.

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant
Accepted solution

@Edwin.Saez.Jamanca wrote:

....
I wanted to ask you if it could be included in a single line of code, excluding polylines and hatchs. it's possible?


That would require a "logical grouping" of things that are not Polylines AND are not Hatches.  Read about logical groupings in (ssget) filter lists in Help.

 

(initcommandversion 2)
(command "_.explode" (ssget "_X" '((-4 . "<AND") (0 . "~*POLYLINE") (0 . "~HATCH") (-4 . "AND>"))) "")
Kent Cooper, AIA
Message 5 of 5

Ranjit_Singh
Advisor
Advisor

@Edwin.Saez.Jamanca wrote:

................


I wanted to ask you if it could be included in a single line of code, excluding polylines and hatchs..........


(ssget "_x" '((-4 . "<not") (0 . "*polyline,hatch") (-4 . "not>"))