I want to show the layout name and number inside a gdl object that I placed on my layout.
How can I get a layout name and number into my GDL script?
I want to show the layout name and number inside a gdl object that I placed on my layout.
How can I get a layout name and number into my GDL script?
You can get the layout name in several ways inside your GDL script.
A commonly used solution is to use the autotext tags
<LAYOUTNAME>
or<LAYOUTID>
as a string. This tag will be replaced by the layout name or layout id AFTER the gdl object has compiled.or
All autotext tags can be found here in the documentation.
Note: Be aware that
<LAYOUTID>
and<LAYOUTNUMBER>
are two different things!The problem with this solution is that you cannot use the value in for example function to compare with a value. So this will never evaluate to true:
In case you want to do something like that that there is an alternative way using the GDL
REQUEST
options functionThe values will be stored in the variables
LayoutId
andLayoutName
This is also documented here and mentioned here on the ArchiCAD-TALK forum
It is possible to evaluate this value and use this directly in your code: