We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-10-09 09:36 PM - last edited a month ago by Laszlo Nagy
Hi everyone,
I’m currently working on creating a custom Zone Stamp in Archicad 27 to automatically display floor, wall, and ceiling finish materials. The goal is to have these materials automatically update based on the elements that the Zone Tool interacts with, using a combination of custom parameters and `REQUEST` commands. However, I’m facing a few issues and could use some guidance.
Here’s what I have done so far:
1. Created Custom Parameters:
- `zoneFloorFinish`, `zoneWallFinish`, and `zoneCeilingFinish` as String type parameters in the Zone Stamp.
2. Script Setup:
- Used `REQUEST("Name_of_top_material", "", zoneFloorMaterial)` in the `Master Script` to detect the floor material.
- Used similar `REQUEST` commands for wall and ceiling materials.
- Then, I set these values to the custom parameters using `PARAMETERS zoneFloorFinish = zoneFloorMaterial`.
3. 2D Script:
- Used `text2` commands in the `2D Script` to display these values, like so:
text2 0, 0, "Döşeme: " + zoneFloorFinish
text2 0, -0.2, "Duvar: " + zoneWallFinish
text2 0, -0.4, "Tavan: " + zoneCeilingFinish
4. Issue:
- When placing the Zone, the parameters don’t seem to capture the correct material names. Instead, they are either empty or display incorrect values.
- I have tried using different `REQUEST` variants and adjusting the `Master Script`, but I’m still unable to get the correct material values displayed.
Question:
How can I modify my Zone Stamp and GDL script to ensure the custom parameters (`zoneFloorFinish`, `zoneWallFinish`, and `zoneCeilingFinish`) correctly display the materials for each surface? Any help or insights would be greatly appreciated!
Thanks in advance!
2024-10-10 12:19 AM
Sadly that's not possible afaik.
Zones do not really anything about their environment. Actually nothing in Archicad knows anything 😄
Only Labels.... to some degree.
"REQUEST("Name_of_top_material")" is also something that I do not recognize. It's not in the reference manual. 🤔
2024-10-10 12:59 PM
Ahh, I see. I guess I’m trying to do something that’s not possible. Thanks for the response.
By the way, REQUEST("Name_of_top_material") was ChatGPT’s idea 😁
2024-10-10 01:30 PM
Hi,
There's a REQUEST command in GDL. It's used to get information about parameters
REQUEST (question_name, name | index, variable 1 [, variable 2, ...])
I used it to fetch profiles' informations for a GDL tube shape.
The profile is selected by the user and its parameters are read by the object
But I don't know if it can get informations from adjacent shapes.