Author Topic: Non-Explodeable blocks in 2006  (Read 4845 times)

0 Members and 1 Guest are viewing this topic.

whdjr

  • Guest
Non-Explodeable blocks in 2006
« on: November 02, 2005, 01:45:01 PM »
Using the 'block' command in AutoCad 2006 it gives you the option to make your block "non-explodeable".  Does anyone know how to change a block that is set this way or know how to explode the block?


Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Non-Explodeable blocks in 2006
« Reply #1 on: November 02, 2005, 01:49:45 PM »
dunno ... insert as *blockname ?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Bob Wahr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #2 on: November 02, 2005, 02:02:22 PM »
Code: [Select]
Sub BoomIt()
Dim objblk As AcadBlock
Dim objblks As AcadBlocks
Set objblks = ThisDrawing.Blocks
For Each objblk In objblks
  objblk.Explodable = True
Next objblk
End Sub

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Non-Explodeable blocks in 2006
« Reply #3 on: November 02, 2005, 02:08:18 PM »
There ya go ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

glee

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #4 on: November 02, 2005, 02:41:47 PM »
How about just redefining the block and checking the allow to explode option?
You probably have good reasons not to do so.
So I'll mosey on along..

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Non-Explodeable blocks in 2006
« Reply #5 on: November 02, 2005, 02:53:13 PM »
How about just redefining the block and checking the allow to explode option?
You probably have good reasons not to do so.
So I'll mosey on along..

That sounds like a good reason to disable the check box ....  :whistle:
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Bob Wahr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #6 on: November 02, 2005, 02:55:18 PM »
How about just redefining the block and checking the allow to explode option?
You probably have good reasons not to do so.
So I'll mosey on along..
That's pretty much the same thing that I said glee.  If you want to explode a non-explodable block, you have to change it's definition so that it is explodable.

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #7 on: November 02, 2005, 03:02:52 PM »
dunno ... insert as *blockname ?

Sorry, doesn't work Keith.

Code: [Select]
Sub BoomIt()
Dim objblk As AcadBlock
Dim objblks As AcadBlocks
Set objblks = ThisDrawing.Blocks
For Each objblk In objblks
 objblk.Explodable = True
Next objblk
End Sub

Using your example Bob I penned this in lisp:
Code: [Select]
((lambda (/ lst)
   (vlax-map-collection
     (vla-get-blocks
       (vla-get-activedocument (vlax-get-acad-object))
     )
     '(lambda (x)
(and
  (vlax-property-available-p x 'explodable)
  (eq (vlax-get-property x 'explodable) :vlax-false)
  (not (vlax-put-property x 'explodable :vlax-true))
)
      )
   )
 )
)

How about just redefining the block and checking the allow to explode option?
You probably have good reasons not to do so.
So I'll mosey on along..

I am talking about the block command not the wblock command.

Bob Wahr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #8 on: November 02, 2005, 03:07:55 PM »
I don't know whdjr (is it pronounced whidjer or wahidjer?) there's a whole bunch of curvy things in that code.  Not sure how mine helped produce that mess ;)

Glad you got it solved.  You did get it solved, right?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Non-Explodeable blocks in 2006
« Reply #9 on: November 02, 2005, 03:14:05 PM »
OT: forgive me.

I found long ago that testing for the availability of a property via vlax-property-available-p, testing its current state, and then changing the state was far slower than just putting the hammer down inside a error trap. Not recommended as a blanket technique, but for some things it dramatically drops prosessing times where applicable and beneficial (like processing tens of thousands of drawings via objectdbx). Use carefully, again, not a blanket solution.

e.g.

Code: [Select]
(   (lambda ( )
        (vlax-map-collection
            (vla-get-blocks
                (vla-get-activedocument
                    (vlax-get-acad-object)
                )
            )
           '(lambda (object)   
                (vl-catch-all-apply
                   '(lambda ( )
                        (vlax-put-property
                            object
                            'explodable
                            :vlax-false
                        )
                    )
                )
            )
        )
    )
)

Coded blind.

PS: What was the local variable lst for Will, residual from an earlier version?

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

pmvliet

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #10 on: November 02, 2005, 03:15:18 PM »
Just out of curiosity, can any other this be used when you come across a block that cannot be exploded?  Not talking 2k6, but lower versions. There have been times when you have a block that is not exploded because of different x,y scales and other things of that nature.

I can't find any examples right now, but it did spark my brain...

Thanks,
Pieter

Bob Wahr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #11 on: November 02, 2005, 03:19:47 PM »
No, that's a different issue.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Non-Explodeable blocks in 2006
« Reply #12 on: November 02, 2005, 03:21:17 PM »
If you open that block in an release of ACAD earlier than 2006 you can explode. Not elegant.....but it works.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Non-Explodeable blocks in 2006
« Reply #13 on: November 02, 2005, 03:30:05 PM »
is it pronounced whidjer or wahidjer?

Ummm yes, I'd like to buy a vowel please.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #14 on: November 02, 2005, 03:43:24 PM »
<...SNIP...>

PS: What was the local variable lst for Will, residual from an earlier version?

:)

Originally after I changed the value to 'true' I saved it to a var so I could explode it before exiting the routine, but I decided against that and I guess I left the var by mistake.  Sorry, I will fix.

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #15 on: November 02, 2005, 03:44:46 PM »
is it pronounced whidjer or wahidjer?

Ummm yes, I'd like to buy a vowel please.

:)

It is not pronounced any way. 

William Harold DeLoach Jr

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #16 on: November 02, 2005, 03:46:52 PM »
...
I found long ago that testing for the availability of a property via vlax-property-available-p, testing its current state, and then changing the state was far slower than just putting the hammer down inside a error trap. Not recommended as a blanket technique, but for some things it dramatically drops prosessing times where applicable and beneficial (like processing tens of thousands of drawings via objectdbx). Use carefully, again, not a blanket solution.
...

So...Do you always advocate speed over safety? :-P

Bob Wahr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #17 on: November 02, 2005, 03:47:21 PM »
I don't do letters.  I'm going to pronounce it as something.  If you won't give your preferance, I get to choose.  As of now, you are Whidjer.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Non-Explodeable blocks in 2006
« Reply #18 on: November 02, 2005, 03:50:02 PM »
So...Do you always advocate speed over safety?

I believe I addressed that already.

:P
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #19 on: November 02, 2005, 04:34:06 PM »
I don't do letters.  I'm going to pronounce it as something.  If you won't give your preferance, I get to choose.  As of now, you are Whidjer.

Ok then Whidjer it is.   :lol:

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #20 on: November 02, 2005, 04:35:01 PM »
So...Do you always advocate speed over safety?

I believe I addressed that already.

:P
:lmao:

MikePerry

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #21 on: November 03, 2005, 03:35:06 AM »
Just out of curiosity, can any other this be used when you come across a block that cannot be exploded?  Not talking 2k6, but lower versions. There have been times when you have a block that is not exploded because of different x,y scales and other things of that nature.

Hi

Maybe take a look at system variable EXPLMODE.

Have a good one, Mike

DanB

  • Bull Frog
  • Posts: 367
Re: Non-Explodeable blocks in 2006
« Reply #22 on: November 08, 2005, 12:40:14 PM »
Open the new block editor feature for the block in question and check the properties window>>Block>>Allow Exploding>>Yes/No

whdjr

  • Guest
Re: Non-Explodeable blocks in 2006
« Reply #23 on: November 08, 2005, 01:39:31 PM »
Good find Dan.  :-)