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
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

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>

 

Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, Ac20-Ac27
Loving Archicad since 1995
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

Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, Ac20-Ac27
Loving Archicad since 1995

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!