AutoCAD Architecture Customization

Reply
Valued Contributor
paliitali
Posts: 59
Registered: ‎06-23-2007
Message 1 of 3 (358 Views)

Macro, Blocks and Annotation Plot Size

358 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
Distinguished Contributor
David_W._Koch
Posts: 11,056
Registered: ‎12-12-2003
Message 2 of 3 (358 Views)

Re: Macro, Blocks and Annotation Plot Size

03-11-2008 06:12 PM in reply to: paliitali
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
Contributor
cshaw
Posts: 20
Registered: ‎09-25-2007
Message 3 of 3 (358 Views)

Re: Macro, Blocks and Annotation Plot Size

09-23-2008 12:19 PM in reply to: paliitali
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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community