We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

Can’t the building name be used in the title in the project info?

LeeJaeYoung
Virtuoso

Can’t the building name be used in the title in the project info?

 

text2 0,0,"<PROJECTNAME>" is possible.
"<BUILDINGNAME>","<BUILDING NAME>"... did not work.

AC27 on window 11
4 REPLIES 4
Barry Kelly
Moderator

Try ... "<BUILDING_NAME>"

 

Just create some text in the plan using the autotext from project info.

Then save that text as an object, open the GDL script and you will see the autotext commands used.

 

BarryKelly_0-1700450091078.png

 

Barry.

 

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

LeeJaeYoung_0-1700475683389.png

text2 _endX - (_TWidth / 2.0) , 0, "<BUILDING_NAME>"                          !!! + "<Dong Name> " + "<LAYOUTNAME>" !!! "<DRAWINGNAME>"

AC27 on window 11

This may not make any difference, but what happens if you use the code without the quotation marks? Does it work then? So, instead of:

 

text2 0, 0, "<BUILDING_NAME>"

 

try this:

 

text2 0, 0, <BUILDING_NAME>

 

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Laszlo Nagy
Community Admin
Community Admin

I just checked the GDL Reference Guide and I found this command. Maybe this is the solution:

 

AUTOTEXT_LIST
n = REQUEST("AUTOTEXT_LIST", "", autoTextListArray)
Returns one AUTOTEXT array of the autotexts used in the project with the following triplets ["ID", "Category", "Name"]. Expression returns
0 and contains dummy return values (empty string or 0) if used in parameter script, causing additional warning. Can be used only in UI script. The ID is stored
in the parameter via the UI_CUSTOM_POPUP... commands.
Contains all autotexts from Project Info and Autotext Dialog (Text tool - Insert Autotext).
Compatibility: introduced in Archicad 20.
Example:

DIM autoTextListArray[]
n = REQUEST ("AUTOTEXT_LIST", "", autoTextListArray)
! autoTextListArray = [ID1, CategoryName1, TextName1,
! ID2, CategoryName2, TextName2,
! ...
! IDn, CategoryNamen, TextNamen]

 

It is found on Page 531 of

https://help.graphisoft.com/AC/27/INT/GDL.pdf

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27