GDL
About building parametric objects with GDL.

Customising an object: Insert Autotext to automaticlly use ID as text

Anonymous
Not applicable
Hi All,

I'm trying to create a custom object based on Archicad's 'Signal Thermastat 21' Object.
Here's what I'd like to do:
1. I'd like the 'text' to automatically be the 'ID'. Is there a way to use auto text in this situation?
See pic attached.

2. I'd like to change the circle to a rectangle that I can resize with hotspots and numeric input.

Thanks in advanced!
10 REPLIES 10
Hello Oalias,

Labels are made for that.
1 ° - Make your label using the element ID
2 ° - Draw the outline of your rectangle around this text duly centered
3 ° - Select your automatic text and your rectangle
4° - Files/Library and object/Save selection as/Label

Enjoy
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 11.6 Big Sur - MacBook Pro 2017 - 16Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
Laszlo Nagy
Community Admin
Community Admin
You can also modify the GDL script of the element so that the parameter is set to the value entered for the Element ID of the library part.
Of course, this would require a certain amount of GDL knowledge.
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
Peter Baksa
Graphisoft
Graphisoft
Yes, autotext can be used in GDL:
Archicad will substitute all references to autotext fields in whatever GDL output it finds them.
For example, if you write <PROJECTSTATUS> in the parameter string of a text2 command, will nicely replace it with the actual value.
All this is invisible to GDL – consequently the size and other attributes of the text are not measurable.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Anonymous
Not applicable
I was trying to customise this object and use it as a GDL object that i could use as a keynote label for elevations and sections (Some elements that I'd like to label are 2D, some are 3D). I was hoping to be able to populate an interactive schedule from this. Then I found out that this isn't possible with archicad Very sad indeed. Can anyone suggest a way to do this? Keynoting of 2D elements in elevation and section views? It would make life so much easier!
DGSketcher
Legend
The inability to assign data to 2D objects is a major frustration, some things could be so much easier if it was available. You can assign data to a hatch by referencing it to a building material but that's about as far a things go for now. I personally would like to be able to assign data to poly lines for membranes and service runs which don't warrant 3D modelling; it's a real pain drawing & editing a hatch with a constant width, let alone getting the hatch pattern to display consistently.
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Laszlo Nagy
Community Admin
Community Admin
Peter wrote:
Yes, autotext can be used in GDL:
Archicad will substitute all references to autotext fields in whatever GDL output it finds them.
For example, if you write <PROJECTSTATUS> in the parameter string of a text2 command, will nicely replace it with the actual value.
All this is invisible to GDL – consequently the size and other attributes of the text are not measurable.

Peter,

I checked the GDL Reference Guide and I see that these Autotext keywords include only certain types of keywords, like things you enter in the Project Info Dialog, and Layout/Detail/Reference/Marker/Change/Revision-related keywords.

So, if I understand this correctly, GDL Global Variables cannot be used in a similar way.
So to take the original questions, I cannot type "GLOB_ID", or "<GLOB_ID>" or whatever the format is, into the "Text" field shown in that illustration, and then expect the GDL to understand this and then display the Element ID of the Library Part, right?
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
Peter Baksa
Graphisoft
Graphisoft
Sorry, I didn't answer the "this situation" part of the question. For an object simply use GLOB_ID, no need for autotext. For labels use REQUEST ("Full_ID_of_parent" ...)

About keynoting lines: the name of the line type could be used as data.

LaszloNagy wrote:
Peter wrote:
Yes, autotext can be used in GDL:
Archicad will substitute all references to autotext fields in whatever GDL output it finds them.
For example, if you write <PROJECTSTATUS> in the parameter string of a text2 command, will nicely replace it with the actual value.
All this is invisible to GDL – consequently the size and other attributes of the text are not measurable.

Peter,

I checked the GDL Reference Guide and I see that these Autotext keywords include only certain types of keywords, like things you enter in the Project Info Dialog, and Layout/Detail/Reference/Marker/Change/Revision-related keywords.

So, if I understand this correctly, GDL Global Variables cannot be used in a similar way.
So to take the original questions, I cannot type "GLOB_ID", or "<GLOB_ID>" or whatever the format is, into the "Text" field shown in that illustration, and then expect the GDL to understand this and then display the Element ID of the Library Part, right?
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Laszlo Nagy
Community Admin
Community Admin
OK, thanks Péter.
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
DGSketcher
Legend
Peter wrote:
About keynoting lines: the name of the line type could be used as data.
Thanks for the suggestion Peter, sometimes the simplest solutions are the least obvious.

My frustration stems from the broken up way we are trying connect with various data sources, we are juggling object properties, ID's, classifications, Building Materials, Fill and Linetype names. I seem to have an ongoing battle making sure I have the right label to display the required information consistently. Basically I need to display a specification numeric reference and a short description. The classification system offered some hope but fails to connect with 2D drawing elements and the classification description data which could be really useful in expanded descriptions can't be accessed by labels. Details explode 3D objects to fills and loose their classifications so that we are then reliant on Building Material data. I guess I now need to create a long list of 2D linetypes for my 2D schematic layouts...
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

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!