cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

Get building material name from index

Rico Suleyman
Contributor

I'm trying to pass the building material names of a door's wall to its acoustic property using @runxel's method here.

 

I've been able to get the building material index to work but not the name. I tried using

= REQUEST ("name_of_building_material")

but it doesn't work with parameters.

 

Does anyone know how I can achieve this?

5 REPLIES 5
BrunoH
Expert

Hi Rico,

 

GDL manual p511

NAME_OF_BUILDING_MATERIAL
n = REQUEST("NAME_OF_BUILDING_MATERIAL", index, name)

Returns in the variable the building material name identified by index. Expression returns 0 and contains dummy return values (empty string or 0) if used in parameter script, causing additional warning.
The return value of the request is the number of successfully retrieved values (1 if no error occurred, 0 for error when the index is not valid).

ArchiCad 3.43 to 28
MacOS Monterey
Jochen Suehlo
Moderator

Since Archicad 20 you cannot use the most REQUEST commands in the Parametrer-Script.
For this reason you cannot write the Name of the Building Material into a Parameter.

However, in principle, it is possible to map the parameter gs_list_acousticrating to a property using the method shown in the video.
https://www.youtube.com/watch?v=0Vx5dV1wj6Q

If you only have a few building materials to choose from, you can link conditions in the properties, such as if property value index = 60, then property value text = ‘Concrete’.

Jochen Suehlo . AC12-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
runxel
Hero

Depending on what you need this info for: In the properties and the schedule you can already do that without the need of any tricks.

So I am not sure why it has to come into the GDL, if you want to give it to a property back anyway. What is the use case here? Maybe I think to simple – or you too complicated. 😉

Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | 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»

We have specific rules for measuring quantities here. For measuring finishes, openings up to 2.5m2 are not subtracted from the total area and for openings greater than 2.5m2 we just add 2.5m2 to the net area. In the example below, the blue area is what needs to be counted (net area + area of smaller opening + 2.5m2 for larger opening):

 

RicoSuleyman_0-1762953453864.png

I have a property for my openings that calculates what needs to be added but I would also like to list the materials of the walls in which the doors are placed so I know where to add these extra areas (plaster, masonry, etc.) For example, my finishes schedule says that I have x m2 of plaster and I can add to that the total from the 'plaster' column of my door schedule.

 

Another way it could be achieved is by carefully naming my composites and using that in my property but I'm looking for something more foolproof that can be used by the whole office.

I thought about doing it this way but I would prefer something more flexible that can handle new materials being added.

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!