alijahed Posted June 22, 2010 Share Posted June 22, 2010 Hi All, Seriously confused!! I wrote this: (defun c:test () (command "purge" "_all" "" "_no") ;Insert the first Block (setq blk "circle") (setq cord (list 50. 0. 0.)) (command "_insert" blk cord 1. 1. 0.) ;Insert the second Block (setq blk "rectangle") (setq cord (list 0. 0. 0.)) (command "_insert" blk cord 1. 1. 0.) (command "explode" "_all") ) But surprisingly the explode "all" just explode the first item!!! by using the "explode" command on the command line you can explode the rectangle later manually! How can I fix this problem?! Cheers Ali Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 22, 2010 Share Posted June 22, 2010 For compatibility with old AutoCAD releases, the EXPLODE command accept only one item when used trough AutoLISP - set QAFLAGS system variable to 1 to force it to accept more than on item. Regarding "_all" option try to use SSGET statement instead. (setvar "QAFLAGS" 1) (command "._EXPLODE" (ssget "_X") "") (setvar "QAFLAGS" 0) Regards, Quote Link to comment Share on other sites More sharing options...
alijahed Posted June 23, 2010 Author Share Posted June 23, 2010 Thank you very much for your help. Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 23, 2010 Share Posted June 23, 2010 You're welcome! Regards, Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 23, 2010 Share Posted June 23, 2010 [color="Red"](setvar "QAFLAGS" 1)[/color] (command "._EXPLODE" (ssget "_X") "") (setvar "QAFLAGS" 0) Regards, Hello Mr. msasu, May I ask you about the meaning of the above variable you used earlier ..... Please ? I looked for it with Autocad help but with no result ... Regards, Tharwat Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 23, 2010 Share Posted June 23, 2010 The QAFLAGS is one undocumented system variable of AutoCAD; below you can find a definition of it: "QAFLAGS system variable controls internal functions, it accepts a value between 0 and 32767 (sum of values): bit 0 (1): ^C in menu macro cancels grips (acts like keyboard ). bit 1 (2): no pause during text screen listings. bit 2 (4): no "alert" dialogs (text display instead). bit 7 (128): accepts "screen picks" (point lists) via (command) function." I suggest you to ensure that it is always keept as 0. Regards, Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 23, 2010 Share Posted June 23, 2010 bit 0 (1): ^C in menu macro cancels grips (acts like keyboard ). Thats wonderful Mr.msasu. And as I noticed that the value of (1) would behave in behalf of Cancel in Macros. But in Macro used twice . And it used one time with the 'setvar' and as you know some Autocad command sometimes need to press tow times to escape . Are they behaving the same as a double of escapes . . . ? Thanks for your great cooperation .. Best Regards. Tharwat Quote Link to comment Share on other sites More sharing options...
MSasu Posted June 23, 2010 Share Posted June 23, 2010 @tharwat313: Not sure what you mean, but I presume that is about the way QAFLAGS system variable is interacting with EXPLODE command. Sincerely, I don’t know the mechanism; all that I know is that by setting it on 0 will force the command to accept multiple entities. Regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.