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

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Window Label Unable to Read Zone Information in Elevation

JP1
Contributor

Hello All, I am having trouble getting my window label to read the zone information in elevation.

 

A Label GDL on a window with "Zone_relations_of_owner" reads zone number correctly when tagged in plan. But it returns "0" when tagged in elevation.

 

n = REQUEST ("Zone_relations_of_owner", "",ZONECATNAME, ZONECODE, ZONENAME, ZONENUMBER)
TEXT2 0,0,ZONENUMBER

 

 

However under the same settings a Label GDL on a wall with "Zone_relations" reads zone number correctly in both plan and elevation.

 

n = REQUEST ("Zone_relations", "",ZONECATNAME, ZONECODE, ZONENAME, ZONENUMBER)
TEXT2 0,0,ZONENUMBER

 

 

It would be great if someone can help me figure out how I can get the label to read zone number when tagged on a window in elevation view. Thanks for reading.

 

James


Screen Shot 2022-03-29 at 9.48.54 am.pngScreen Shot 2022-03-29 at 9.48.41 am.pngScreen Shot 2022-03-29 at 9.49.14 am.png
2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
Peter Baksa
Graphisoft
Graphisoft

Hi,

this might be a bug, as REQUEST "WINDOW_DOOR_ZONE_RELEV_OF_OWNER" works correctly and reacts to flipping. I will report it.

 

You can use autotexts as a workaround.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

View solution in original post

Solution

I have explained this a bit here.

My pro-tip: Just make a text with the text tool in the floor plan, then save this text as an object, and then obviously open it up. It's the fastest way to obtain any autotext for further usage in GDL.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

5 REPLIES 5
Solution
Peter Baksa
Graphisoft
Graphisoft

Hi,

this might be a bug, as REQUEST "WINDOW_DOOR_ZONE_RELEV_OF_OWNER" works correctly and reacts to flipping. I will report it.

 

You can use autotexts as a workaround.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

 

Thank you Peter. I am very much open to your suggested workaround. However I am not familiar with autotext in GDL - perhaps you could explain a bit further for me.

I figured the autotext #From Zone Number returns the information I need but not sure how to apply it into text2.


Screen Shot 2022-04-01 at 8.35.29 am.png
Solution

I have explained this a bit here.

My pro-tip: Just make a text with the text tool in the floor plan, then save this text as an object, and then obviously open it up. It's the fastest way to obtain any autotext for further usage in GDL.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
JP1
Contributor

Thanks very much runxel. I think I got my head around it now!

I meant autotext without GDL.

 

The best way to get the ID of an autotext is creating an autotext, and dragging it into a 2D script.

The element-based autotexts are techically properties identified by a GUID:

<PROPERTY-EDC44824-1A6D-407A-9E39-693066622E7D>

These can change between plan files and versions. Archicad takes care of changing them if they are parameters (try saving an autotext as an object), but it means you can't use a hard-coded value.

 

Another workaround is that autotexts under General Parameters are also available as a property. Properties can be displayed this way: https://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest