Author Topic: Problem exploding dynamic blocks  (Read 2330 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Problem exploding dynamic blocks
« on: December 24, 2008, 04:47:14 PM »
All, I've got a piece of code in which exploding blocks with the block reference .Explode() method plays an important role.  A drawing contains a number of block references.  After block references are exploded, the resulting geometry and relative location of primitives are analyzed.

We've started using dynamic blocks and visibility states just to make editing drawings easier.  Right then the code started failing on simplest dynamic blocks with two visibility states ON/OFF.  Calling .Explode results in "Invalid key" error with no further details.

However, the blocks will explode with the EXPLODE command from AutoCAD command line.

But even a simplest VBA macro with just the interactive pick utility and immediate .Explode of the selected block reference fails with "Invalid key".

Tried several CAD installations, both 2006 and 2008 - still "Invalid key". In all other respects the block behaves fine.

I appreicate any ideas. I would like to post an example but not sure if I can do it directly on the forum. If it is not possible, I'll link to it somehow.



  • Guest
Re: Problem exploding dynamic blocks
« Reply #1 on: December 24, 2008, 04:53:39 PM »
Update: if visibility grips are erased, VBA .Explode works.

Wondering if I have to take out the grips in code somehow before attempting to explode.  How would I get a reference to the grip itself?


  • Guest
Re: Problem exploding dynamic blocks
« Reply #2 on: December 25, 2008, 12:40:43 AM »
It works if I call ConvertToAnonymousBlock or ConverToStaticBlock prior to explosion.
Still, a strange problem and behavior.


  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Problem exploding dynamic blocks
« Reply #3 on: December 26, 2008, 12:50:14 PM »
Glad you found it.  I was just about to say I heard you needed to convert to static block before exploding it.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second