svorgodne Posted October 11, 2018 Posted October 11, 2018 Hello everyone, Is there any way to script something in Lisp to avoid the "Explode" check box on the insertion command? My first guess was there would be probably asystem variable that controls that but couldn't find it. Any suggestions? Clues? thanks in advance Quote
rlx Posted October 11, 2018 Posted October 11, 2018 https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/turn-off-explode-on-insert/td-p/3186542 To uncheck the 'Explode' toggle on the Insert dialog: (vl-registry-write (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar 'CPROFILE) "\\Dialogs\\insert_dialog") "Explode" 0 ) Quote
Tharwat Posted October 11, 2018 Posted October 11, 2018 Hi, I have noticed is that this Explode option in AutoCAD 2017 ( this version is what I am currently using ) is related to the block definition itself, so if you checked the option of Allow Exploding at the creation of the block then that Explode check box would be available to the user to toggle otherwise users won't able to activate it at all from the INSERT command unless they have the block definition redefined with allow exploding. Its just an info for all whom did not already knew this. Quote
rlx Posted October 11, 2018 Posted October 11, 2018 5 minutes ago, Tharwat said: Hi, I have noticed is that this Explode option in AutoCAD 2017 ( this version is what I am currently using ) is related to the block definition itself, so if you checked the option of Allow Exploding at the creation of the block then that Explode check box would be available to the user to toggle otherwise users won't able to activate it at all from the INSERT command unless they have the block definition redefined with allow exploding. Its just an info for all whom did not already knew this. This was somewhere in the back of my mind (way way back) but don't think I ever created blocks with the explicit option of not allowed to explode. Mostly because I hate to have or to put restrictions on people. But maybe its not a bad idea for some people to protect them against themselves Thanx for the info bro 1 Quote
ronjonp Posted October 11, 2018 Posted October 11, 2018 (edited) You could use this to make all your blocks unexplodable <- word? (vlax-for a (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) (and (= 0 (vlax-get a 'islayout)) (vla-put-explodable a :vlax-false)) ) Edited October 11, 2018 by ronjonp me fix grammar Quote
svorgodne Posted October 11, 2018 Author Posted October 11, 2018 Thanx to everyone, I found the problem. I made a lisp routine to setup different UCS which are loaded from different drawings which are inserted as exploded objects. "-insert" "*Path\\Drawing.dwg" "0,0" For some reason, and since this is loaded from the very beginning, every time a drawing is loaded, then some variable remains like that. I solved this adding the code @rlx was suggesting (vl-registry-write (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar 'CPROFILE) "\\Dialogs\\insert_dialog" ) "Explode" 0 ) at the end of the whole routine, so everything goes back to "normal". Quote
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.