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

how to make unexplodable blocks explodable?

35 REPLIES 35
Reply
Message 1 of 36
bhuta_n
19904 Views, 35 Replies

how to make unexplodable blocks explodable?

hi,
i want unexplodable blocks to be explodable.any help?i know thr is explodable property of a block.but dont know to use lisp...
thanx
35 REPLIES 35
Message 2 of 36
_gile
in reply to: bhuta_n

Hi,

Here's a little routine to put explodable all blocks in the drawing

(defun c:expl-p ()
(vl-load-com)
(vlax-for b (vla-get-Blocks
(vla-get-ActiveDocument (vlax-get-acad-object))
)
(or (wcmatch (vla-get-Name b) "`**_Space*")
(vla-put-explodable b :vlax-true)
)
)
(princ)
)


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 36
bhuta_n
in reply to: bhuta_n

thank u
i will have to work on it for my needs
Message 4 of 36
MadMage863
in reply to: bhuta_n

Open the block in the block editor and, without selecting anything, open properties. Near the bottom should be the 'allow exploding' pulldown options.
Message 5 of 36
moon47usaco
in reply to: bhuta_n

Thanks gile

=]
Message 6 of 36
Tom Smith
in reply to: bhuta_n

I thought you said you had far too many blocks to handle this way.
Message 7 of 36
RockyBrown4134
in reply to: _gile

Gilles;

Just cleaning up some old post. I just wanted to say thank you for this simple but great tool.

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
Message 8 of 36
vferrara
in reply to: _gile

How can I utilize this for a specific block (example "Grid1") not all blocks on the drawing..??

 

Thank you,

Vince

Message 9 of 36
Kent1Cooper
in reply to: vferrara


@vferrara wrote:

How can I utilize this for a specific block (example "Grid1") not all blocks on the drawing..??

....


 

See Message 4 [in which "the block editor" is the BEDIT command].

Kent Cooper, AIA
Message 10 of 36
vferrara
in reply to: Kent1Cooper

Thank you for your response......but based on your initial code example can this be done for only one specific block programmatically..??

 

Regards,

Vince

Message 11 of 36
ronjonp
in reply to: vferrara

Try this:

(defun _esplodable (name / e)
  (and (setq e (tblobjname "block" "idt_flagnote"))
       (setq e (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) name))
       (vla-put-Explodable e :vlax-true)
  )
)(vl-load-com)
(_esplodable "youblockname")
Message 12 of 36
vferrara
in reply to: ronjonp

Thank you for your assistance....!!

 

Vince

Message 13 of 36
ronjonp
in reply to: vferrara

There is an error in the code above and I can't I edit my post??? Anyhoo .. here's the corrected version.

(defun _esplodable (name / e)
  (and (setq e (tblobjname "block" name))
       (setq e (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) name))
       (vla-put-explodable e :vlax-true)
  )
)
(vl-load-com)
(_esplodable "youblockname")

 

Message 14 of 36
RockyBrown4134
in reply to: bhuta_n

Here is the LISP routine that I use. Gilles Chanteau, Autodesk Expert Elite, helped me with it. He wrote the first command, and I modified it for the second command. Credit  Gilles Chanteau.

 

the two commands allows me to toggle from Explode "on" and Explode "off" for all the blocks contained in a file.

 

Hope this helps.

 

Gilles,. Thank you again!!!

If this response answers your question, Please mark this response as "Accept as Solution"

Rocky Brown
AutoCAD 2020 / Inventor 2020 / Plant 3D
Message 15 of 36
Kent1Cooper
in reply to: ronjonp


@ronjonp wrote:

.... I can't I edit my post??? ....


[There's a time limit within which you can edit a Message.  I think it's 30 minutes.]

Kent Cooper, AIA
Message 16 of 36
ronjonp
in reply to: Kent1Cooper

That's an odd policy...

Message 17 of 36
Kent1Cooper
in reply to: ronjonp


@ronjonp wrote:

That's an odd policy...


 

Put something like "time limit to edit posts" into the Search window in the Community Feedback Forum, for several threads discussing that.

Kent Cooper, AIA
Message 18 of 36

I understand this is an old lisp, but when I tried to execute it said: too few arguments. Would have any Idea how to solve it?

Message 19 of 36
dlanorh
in reply to: andresperezcera

There are lots of lisps above. Which one is giving an error?

I am not one of the robots you're looking for

Message 20 of 36
andresperezcera
in reply to: dlanorh

Hello dlanorh,

 

The one provided by RockyBrown4134 on 07-25-2018 gives me the "error: too few arguments" error. If I knew any lisp I wouldn't even write before attempting modifications, but I'm totally lost at this point.

 

Thanks for the speedy answer.

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost