Author Topic: Anonymous/Dynamic Block question....  (Read 1691 times)

0 Members and 1 Guest are viewing this topic.

BazzaCAD

  • Bull Frog
  • Posts: 269
  • Cylons will kill you
Anonymous/Dynamic Block question....
« on: April 20, 2009, 07:21:05 PM »
Before I start banging my head against the wall trying to see if this is passable, I thought I'd ask the exports.  Is it possible to substitute a block for another block inside an anonymous/dynamic block? For example, you have a master dynamic block that has left & right end caps.  The end caps could be any combination of sub-blocks A, B, or C. Can I loop through the anonymous block, find the place holder for the end cap block & substitute it for the new sub-block without screwing up the other master blocks with the same definition?
a.k.a. Barry Ralphs

whdjr

  • Guest
Re: Anonymous/Dynamic Block question....
« Reply #1 on: April 21, 2009, 03:14:23 PM »
Wow! That's an ambitious project to say the least.

Right off the top of my head I would have to say no, BUT that depends entirely on a lot of other things.  If you intend to have DBs nested inside other DBs then no they won't work.  If you intend to have dumb blocks nested inside DBs then there is a possibility.  Another issue is upon insertion a DB has a "block name" and an "effective name".  In order for this to work you would have to know both of these otherwise you would be updating all the blocks in the dwg.  And I'm not 100% sure this would actually work anyway.

So it sounds like it's head banging time.

Good Luck!

BazzaCAD

  • Bull Frog
  • Posts: 269
  • Cylons will kill you
Re: Anonymous/Dynamic Block question....
« Reply #2 on: April 21, 2009, 03:21:11 PM »
thanks for the advice, and no I'm not trying to use DB's inside DB's.
a.k.a. Barry Ralphs

mkweaver

  • Bull Frog
  • Posts: 344
Re: Anonymous/Dynamic Block question....
« Reply #3 on: April 21, 2009, 09:36:15 PM »
It appears that this will work, to a point.  To test I created a dynamic block with an embedded mtext.  I inserted it a couple of times and changed the dynamic property on two of the three insertions.  I then ran a routine that allows me to edit the embedded mtext.  The change showed up, and only in the instance of the block that I selected.  Changing the dynamic property on any of the blocks did not affect the modified mtext.  However, resetting the block with the modified mtext also reset the mtext to match the parent block definition - the changes went away.

This is a simplistic test, but I would expect embedded blocks to behave in a similar manner.

Hope that helps.

Mike