BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Text Frame in GDL

Anonymous
Not applicable
Is it possible to add text frame to your text within GDL scripting?
5 REPLIES 5
Barry Kelly
Moderator
Not as a simple option in the text.
But you can request the height of your text style …
REQUEST ("Height_of_style", name, height [, descent, leading]) 
… and then the width of the text string…
STW string_expression)/1000*GLOB_SCALE 
… and then place a rectangle or fill that is the correct size and location.

Or if you are using the textblock command you can request the size of the textblock …
rrr = REQUEST ("TEXTBLOCK_INFO",textblock_name, width, height)
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

How do I use this?

REQUEST ("Height_of_style", name, height [, descent, leading]) 

 

It's taken from the GDL reference document, but it's not designed for novices like me.

 

I have  this:

REQUEST ("Height_of_style", my_text_style_name, height [, descent, leading])

but I get this error:

 

Missing comma in parameter list

at mylinenumber in the 3D script of file myfilename.

 

I don't understand the braces or how you can have a comma after a brace. If I take the section between braces out, I get this error:

 

Missing comma in parameter list

at mylinenumber in the 3D script of file myfilename.

 

The guidance could be a lot clearer...

Archicad 27 UKI | OS X 12.7.1 Monterey

In the GDL manual the presence of the brackets are to highlight options [, Optional Values ] that may be omitted from the code line. Either omit everything including the  [ ] or just omit the [ ] to set the extra values.

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

Thanks! Makes perfect sense now you have explained it. Getting started with GDL is a bit daunting, but making progress.

Archicad 27 UKI | OS X 12.7.1 Monterey

Thanks a lot - fixed it!

 

Screenshot 2022-12-12 at 14.42.43.png

 

Sometimes it's useful to have guidance, even if it's a bit of a stupid question 😀

Archicad 27 UKI | OS X 12.7.1 Monterey
Learn and get certified!