Jump to content

Using VBA to insert Annotative text Object


Recommended Posts

Posted

Hi all, I'm trying to tweak previously written code to, instead of using the model text height, somehow use the paper text height. What I'm searching for is a way to either retrieve the value of the modelspace's current annotation scale and use it to calculate the model text height, or to use a property of text objects that I'm not aware of that changes the paper text height for annotative texts.

 

Thanks in advance :).

Posted

Maybe something along the lines of cannoscale value?

Posted

Alright! figured it out

 

 
sngtest = ThisDrawing.GetVariable("CANNOSCALEVALUE")

 

sngtest stores the value of the currently used annotation scale of the drawing being worked on. So from there, one can use that value to calculate the model text height. For Example, the Annotation Scale is 1:20; it will return the value .05. So, if you want Pspace text height to be .075, you would say .075/.05 = 1.5 (Mspace text height).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...