Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Explode command lisp help

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
gccdaemon
417 Views, 2 Replies

Explode command lisp help

The string below was working, but now I get the following error:

 

Command: ; error: bad function: T

 

Just trying to automate exploding leaders and dims in a detail formatting tool.

 

(if (setq DIM  (ssget "x" '((-4 . "<or") (0 . "DIMENSION") (0 . "LEADER") (-4 . "or>"))))
    ((initcommandversion) (vl-cmdf "_explode" DIM)))
(while (setq DIM (ssget "x" '((-4 . "<or") (0 . "DIMENSION") (0 . "LEADER") (-4 . "or>"))))
    ((initcommandversion) (vl-cmdf "_explode" DIM "")))

 

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: gccdaemon

(progn (initcommandversion) (vl-cmdf "_explode" DIM))

HTH
Henrique

EESignature

Message 3 of 3
Kent1Cooper
in reply to: gccdaemon

I don't know whether this will answer your question, because I don't see where that T would be coming from.  And I'm not sure about this under (vl-cmdf) or in relation to (initcommandversion), but it's certainly true when using a (command) function that [for whatever inexplicable reason] under normal circumstances the Explode command can't Explode more than one object at a time.  So you can't feed it a selection set, unless you play with the mysterious and undocumented QAFLAGS System Variable.  Search for threads with Explode and QAFLAGS in them, and you'll find lots of examples of how to deal with it.  Or you can step through a selection set, and Explode each thing in it individually, to avoid the QAFLAGS issue.

 

As an aside, you can simplify your selection-set filtering, by combining multiple entity type names in (wcmatch) fashion:

 

(if (setq DIM (ssget "x" '((0 . "DIMENSION,LEADER"))))

....

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost