cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

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
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), 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 28 UKI | OS X 14.7 Sonoma

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 28 UKI | OS X 14.7 Sonoma

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 28 UKI | OS X 14.7 Sonoma