Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ADD TEXT STYLE TO 2D SCRIPT

Anonymous
Not applicable
Hi Forum,

I have a basic boundary tool that I need to change the font, text size, etc of. The current script is attached as an image. It would be much appreciated if someone skilled could provide me with the correct script and where to put it to be able to define font, text size, etc.
Thank you, kindly.

Robert
CUD
1 REPLY 1

Barry Kelly
Moderator
At the beginning of the script you need to 'DEFINE STYLE' to set the values for the font you want to use.

DEFINE STYLE "name_string" font_family, size, anchor, face_code

Then just before the TEXT2 command you have to 'SET STYLE' to use it.

SET STYLE "name_string"


You can define as many fonts styles as you want (all with different names) and then set them just before you want to use them.

The font_family, size, anchor, face_code variables can all be parameters so that your user of the object can change them in the object settings.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!