BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.

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 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!