Jump to content

Ares Commander - Global Text Scale Help


Kawlos

Recommended Posts

Hello!

 

I've been tasked with trying to get some LISP routines working with Ares Commander. To be honest, I've had to write everything from scratch with limited to no experience, so do bear with me.

 

 

Working in Surveying, we have three buttons for scales to text in the model space: 50, 100 and 200. Each button creates a global scale and changes the LT Scale, PDsize and of course, the text based on what you click. The Global Scales are:

 

1:50 - 0.004

1:100 - 0.008

1:200 - 0.012

 

Our main text sizes are fine: 1:50 is .1, 1:100 is .2 and 1:200 is .3. So in our text lisp routine, it's as simple as * 25:

 

  ;; Set the text height based on global scale factor
  (setq txtHeight (* 25 globalScaleFactor))  ; Calculate text height based on global scale
  (setvar "TEXTSIZE" txtHeight)              ; Set the global text height

 

But when it comes to a different text lisp for annotations, I need to get the text height to equal the following:

 

1:50 - .2

1:100 - .3

1:200 - .4

 

Now this isn't as simple as * 25 as it doesn't work, so instead, the entire lisp routine is the attached, but for some reason I cannot get it to work.

 

I'm just wondering if anyone can make any suggestions to get me past the line!

 

I've attached an example of T2 which works fine, and T3 which is what I need to work. If anyone needs the additional files to help, I can DM them to you.
 

T2.lsp T3test.lsp

Link to comment
Share on other sites

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...