Author Topic: Insert Block with Annotative Scale  (Read 4843 times)

0 Members and 1 Guest are viewing this topic.

Dave R

  • Guest
Insert Block with Annotative Scale
« on: October 26, 2007, 04:04:48 PM »
We have a number of symbols/blocks that are kept in a folder on the network. The blocks have been saved with their annotative property set to "Yes". I would like to be able to insert these blocks into a drawing with VBA and maintain the annotative property. I have not found a way to do this using VBA. Does anyone have any ideas.

AutoCAD 2008 SP1.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #1 on: October 26, 2007, 05:08:25 PM »
Let me work on that
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

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #2 on: October 26, 2007, 05:30:45 PM »
I cant find any annotative properties in VBA except for AcadMLeaderStyles
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

Bob Wahr

  • Guest
Re: Insert Block with Annotative Scale
« Reply #3 on: October 26, 2007, 05:59:30 PM »
I haven't don't much (anything really) with the annotative properties yet but looked at this a little bit.  From what I can see, there's no way to set the annotative property of a block.  It either is or isn't based on whether annotativedwg is set to 0 or 1 in the drawing.  If it's 1, there'snothing to maintain, it just is annotative.  Any chance you could clarify what you mean?

Dave R

  • Guest
Re: Insert Block with Annotative Scale
« Reply #4 on: October 29, 2007, 08:22:13 AM »
I haven't don't much (anything really) with the annotative properties yet but looked at this a little bit.  From what I can see, there's no way to set the annotative property of a block.  It either is or isn't based on whether annotativedwg is set to 0 or 1 in the drawing.  If it's 1, there'snothing to maintain, it just is annotative.  Any chance you could clarify what you mean?

Bob -

Try this and you'll see what I mean. Create a block in a drawing and make it annotative. Now insert the block using the normal AutoCAD insert method. It remains annotative, i.e.: it will scale up and down as the drawing scale changes. Now try to insert the block using a VBA InsertBlock  method. The block will not be annotative. The same thing occurs when you wblock an annotative block to an external file and try to insert it using VBA.

Any clearer?

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #5 on: March 13, 2008, 03:16:44 PM »
OK, this is really making me mad.  How do you make annotative blocks if you are wblocking out the graphics?  I cant figure this stupid thing out.  I have tried wblocking out the graphics, opening the block.dwg and trying to use Bedit to set annotative to yes.  It keeps setting itself back to No.  Any ideas???????????
« Last Edit: March 13, 2008, 03:22:51 PM by CmdrDuh »
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

Guest

  • Guest
Re: Insert Block with Annotative Scale
« Reply #6 on: March 13, 2008, 03:25:34 PM »
OK, this is really making me mad.  How do you make annotative blocks if you are wblocking out the graphics?  I cant figure this stupid thing out.  I have tried wblocking out the graphics, opening the block.dwg and trying to use Bedit to set annotative to yes.  It keeps setting itself back to No.  Any ideas???????????

Quote
ANNOTATIVEDWG
Specifies whether or not the drawing will behave as an annotative block when inserted into another drawing

Dave R

  • Guest
Re: Insert Block with Annotative Scale
« Reply #7 on: March 13, 2008, 03:55:30 PM »
OK, this is really making me mad.  How do you make annotative blocks if you are wblocking out the graphics?  I cant figure this stupid thing out.  I have tried wblocking out the graphics, opening the block.dwg and trying to use Bedit to set annotative to yes.  It keeps setting itself back to No.  Any ideas???????????

Quote
ANNOTATIVEDWG
Specifies whether or not the drawing will behave as an annotative block when inserted into another drawing

That's fine if you use AutoCAD commands to insert the block. Try inserting it using a VBA InsertBlock method.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #8 on: March 13, 2008, 04:11:54 PM »
OK, this is really making me mad.  How do you make annotative blocks if you are wblocking out the graphics?  I cant figure this stupid thing out.  I have tried wblocking out the graphics, opening the block.dwg and trying to use Bedit to set annotative to yes.  It keeps setting itself back to No.  Any ideas???????????


Quote
ANNOTATIVEDWG
Specifies whether or not the drawing will behave as an annotative block when inserted into another drawing

Well doesn't that just make me feel stupid!

Thanks Matt


OK, Dave, Ill bite, have we found a way at all to use VBA?
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

Guest

  • Guest
Re: Insert Block with Annotative Scale
« Reply #9 on: March 13, 2008, 04:15:02 PM »
I was replying to CmdrDuh's post about WBLOCK'ing out the graphics.  In the newly wblock'ed drawing, you would have to change the ANNOTATIVEDWG variable to 1 to allow it to react to the annotation scale of the drawing it's being inserted into.

As for the VBA insert problem....... Um.... yeah...... . . . . . .  .  .  .  .    .    .    .    .

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #10 on: March 13, 2008, 04:17:33 PM »
No , Matt, I was saying I feel stupid b/c if I had actually read the whole thread, you wouldn't have had to tell me that.  No worries
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

Dave R

  • Guest
Re: Insert Block with Annotative Scale
« Reply #11 on: March 13, 2008, 04:37:32 PM »

OK, Dave, Ill bite, have we found a way at all to use VBA?

Not yet. The only workaround I have at the moment is to have the block already inserted into a template file. There doesn't have to be a blockreference in the drawing, just a block in the blocks collection. That way I can use VBA to insert the block at any time and it will be annotative. Bit of a pain tho' having to keep blocks in the template "in case" I want to insert them into a drawing at some point. I'm sure there is probably a way to do this somehow, cos good ol' Autodesk wouldn't put out a defective product, would they?  ;-)

sinc

  • Guest
Re: Insert Block with Annotative Scale
« Reply #12 on: March 17, 2008, 12:32:03 AM »
Maybe it has something with the schizophrenic trend toward .NET (for most of Autodesk, anyway).

In .NET, you can create Annotative blocks.  There's an "Annotative" property on Block Records - just set it to true.  I'm guessing it's also exposed in ObjectARX, although I haven't looked.  VBA might be the odd man out.  (Oh, and I don't know if you can do it in Lisp, either.)

Dave R

  • Guest
Re: Insert Block with Annotative Scale
« Reply #13 on: March 17, 2008, 12:41:49 PM »
Maybe it has something with the schizophrenic trend toward .NET (for most of Autodesk, anyway).

In .NET, you can create Annotative blocks.  There's an "Annotative" property on Block Records - just set it to true.  I'm guessing it's also exposed in ObjectARX, although I haven't looked.  VBA might be the odd man out.  (Oh, and I don't know if you can do it in Lisp, either.)

Unfortunately I'm not far enough along with C# yet to tackle something like that. Still trying to get the fundamentals down.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Insert Block with Annotative Scale
« Reply #14 on: April 09, 2008, 03:03:59 PM »
me either, but Im going to go see if i can find 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