Author Topic: Dynamic Blocks & ObjectDBX  (Read 2378 times)

0 Members and 1 Guest are viewing this topic.

Serge J. Gianolla

  • Guest
Dynamic Blocks & ObjectDBX
« on: November 08, 2005, 06:12:02 PM »
JeffM, you helped me in past with adding blocks to [and inserting from] a dwg via dbx. Trouble is DynBlocks chuck a wobbly using the code, so was wondering if you could help - or anyone who want/can chime in for that matter? I do not know if you kept a copy of the code, but if needed; let me know!

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Dynamic Blocks & ObjectDBX
« Reply #1 on: November 08, 2005, 06:28:41 PM »
Hi Serge,
I do still have the code, trouble is I have not yet even used dynamic blocks within a drawing....much less tried programming with them. If you could post the drawing(s) and what it does/shouldn't do I'll take a look.

Serge J. Gianolla

  • Guest
Re: Dynamic Blocks & ObjectDBX
« Reply #2 on: November 08, 2005, 07:22:00 PM »
Hey Jeff,
Basically the dwg is a library of blocks that one can add to via dbx. Unless you meant as a dwg, the DynBlock itself? I can post it [if i find the way to do it] alternatively, any one dyn. block provided with ACAD2006 ought to do it.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Dynamic Blocks & ObjectDBX
« Reply #3 on: November 08, 2005, 08:17:29 PM »
OK, looking at these a bit I don't see why they'd fail, unless you are selecting the block to copy....
If you could list the exact steps you take so that I can try to dulpicate the error it would help.
BTW, are you using THIS code?
If so, you will need to update the code to read "ObjectDBX.AxDbDocument.16" to use in R2006.

Also, I just copied the "Toilet" dyn. block from one of the Sample drawings to an older test.dwg I have using the aforementioned code with that one modification.

Serge J. Gianolla

  • Guest
Re: Dynamic Blocks & ObjectDBX
« Reply #4 on: November 08, 2005, 08:33:47 PM »
I already did the mods for 2006 at the time and on normal blocks, it works. I am using a form [done with ObjectDCL] that allows a user to view the dbx dwg as a library and dragndrop from that form to the dwg and vice-versa! Yes, i am using that exact same code! Maybe because the dynamic block has different naming convention or some else!!

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Dynamic Blocks & ObjectDBX
« Reply #5 on: November 08, 2005, 09:06:18 PM »
Quote from: Serge J. Gianolla
...dragndrop from that form to the dwg and vice-versa! ... Maybe because the dynamic block has different naming convention or some else!!
Yes, the INSERTS have a different naming convention. Without seeing your code (and I've never used ObjectDCL) the only thing I can say is that if the user is selecting a block in the drawing and drg/dropping it, you must get the "EffectiveName" of the block, as the "Name" property of Dynamic blocks is most always of the form "*D18", whichs means it's an anonymous block. The only link back to the block definition is with the effectivename.....

HTH,
Jeff

Serge J. Gianolla

  • Guest
Re: Dynamic Blocks & ObjectDBX
« Reply #6 on: November 08, 2005, 10:04:35 PM »
Thanks Jeff. I'll look into that effective name - to see if it is more effective :-D Don't think the problem is due do ODCL.