AutoCAD Architecture Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Macro, Blocks and Annotation Plot Size
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
332 Views, 2 Replies
03-11-2008 11:18 AM
Hi,
I was wondering if it is possible to have a macro that will bring in a specific block "Roof Drain" from a specific drawing "C:\data\Blocks.dwg" and multiply this block by the "Annotation Plot Size"?
I know i can make a macro using the command -insert, but when i use this command, it asks for the blocks name, the insertion point, the scale, and then it will insert the block into the drawing. so i am trying to find a way where the macro will insert the block into a drawing without any questions, and it will multiply the block by the drawings "Annotation Plot Size".
My purpose behind all of this is to have a dynamic block scale according to the annotation scale x the annotation plot size. Is this possible?
Thanks in advance
I was wondering if it is possible to have a macro that will bring in a specific block "Roof Drain" from a specific drawing "C:\data\Blocks.dwg" and multiply this block by the "Annotation Plot Size"?
I know i can make a macro using the command -insert, but when i use this command, it asks for the blocks name, the insertion point, the scale, and then it will insert the block into the drawing. so i am trying to find a way where the macro will insert the block into a drawing without any questions, and it will multiply the block by the drawings "Annotation Plot Size".
My purpose behind all of this is to have a dynamic block scale according to the annotation scale x the annotation plot size. Is this possible?
Thanks in advance
Re: Macro, Blocks and Annotation Plot Size
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-11-2008 06:12 PM in reply to:
i2mikee
It is possible to get the Annotation Plot Size value. How are you writing the "macro"? If you are using VBA, you may be able to access the data more elegantly that in AutoLISP, but sadly my experience is mostly with LISP.
(cdr (assoc 42 (dictsearch (cdr (assoc -1 (dictsearch (namedobjdict) "AEC_VARS"))) "AEC_VARS_DWG_SETUP")))
should return the Annotation Plot Size value, which you could save to a variable and then use to calculate the scale for the INSERT command. I will say I have not done anything with dynamic blocks, and have not tried to apply any sort of additional scaling to annotative content using the INSERT command, so I can not say one way or the other whether having access to the value will be of much use.
--
David Koch
Autodesk Discussion Group Facilitator
Using ADT 2004 at work; access to 2005, 2006, 2007 & 2008 at home
(cdr (assoc 42 (dictsearch (cdr (assoc -1 (dictsearch (namedobjdict) "AEC_VARS"))) "AEC_VARS_DWG_SETUP")))
should return the Annotation Plot Size value, which you could save to a variable and then use to calculate the scale for the INSERT command. I will say I have not done anything with dynamic blocks, and have not tried to apply any sort of additional scaling to annotative content using the INSERT command, so I can not say one way or the other whether having access to the value will be of much use.
--
David Koch
Autodesk Discussion Group Facilitator
Using ADT 2004 at work; access to 2005, 2006, 2007 & 2008 at home
Re: Macro, Blocks and Annotation Plot Size
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-23-2008 12:19 PM in reply to:
i2mikee
This is great David. Now can you help with the code to set it? I would like to set the annotation plot size (42) using lisp.
Any help would be great.
Craig Shaw cshaw@cuh2a.com
CUH2A a Division of HDR
Any help would be great.
Craig Shaw cshaw@cuh2a.com
CUH2A a Division of HDR

