Jump to content

Recommended Posts

Posted

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

 

BlockExploded.JPG.89cd7c5392abc9adc28417b1e5de7433.JPG

 

Posted

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. :) 

Posted
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 🙂

  • Thanks 1
Posted (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 by ronjonp
me fix grammar
Posted

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".

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...