News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Determine text size

Started by Gymbo, March 17, 2018, 04:31:11 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Gymbo

Is there a SYS$ function to determine the actual (2D) text size?
Regards,

Jim

Lar


sys(12) - Default text size [0<=x<=10e6],    no $ (the sys$ functions would deal with the written text, normal sys deal with the text size)

Gymbo

Thanks Lar, I know you set the test size with sys(12), how do you read it? I tried ts = sys(12) and it returned 0. Tried it again just now and it worked, don't know what I did wrong the first time.
Regards,

Jim

Pearco

Gymbo;

That line of code would be  Sys(12) = x
x being the size you want and it needs to be in the Text command section.

As      >Text
         {
         Sys(12) = x
         rest of code
        }
Jim
User since ProDesign 1.5

Gymbo

Actually, the way I use it is to read the text size into ts, change the text size, use the new size, then reset it back to ts.

ts = sys(12)
>text2D
{
  <size 1.5   
  <text [sys$(3),sys$(8)]
}
sys(12) = ts

Regards,

Jim

Lar


Quote from: Pearco on March 18, 2018, 08:46:38 AM
... and it needs to be in the Text command section.
It should work both ways (like in Gimbo's example above).




Lar
ps: Gimbo, best to cick the # button above the writing area ("insert code" button) when writing code in a post (enter the code between the sets of square brackets), so you don't get those smiley faces...
8) ;)