2021-10-22 09:07 AM - last edited on 2024-09-09 11:19 AM by Doreena Deng
Hi everyone!
In my GDL object Properties script, I have building material and material information that I would like to translate from Index to Name.
For example, I have a building material with index 97 and the name Offices. In my lists, I use the building material as a unit. Right now, I have written
IF bui_mat=97 THEN program="Offices"
which obviously isn't the best way to do it (and is prone to mistakes), but I just can't figure out how to do it. I've tried following guides with different REQUEST codes, but I'm doing something wrong. How do I do this?
Thank you!
/Kaj
Solved! Go to Solution.
2021-10-22 09:43 AM
n = REQUEST ("Name_of_building_material", index, name)
Returns in the variable the building material name identified by index.
This should work for you.
You add the index number and it will tell you the name in the 'name' variable.
So in your case...
n = REQUEST ("Name_of_building_material", 97, name)
PRINT name (or do what ever else it is you want to do with 'name'.
Barry.
2021-10-22 09:43 AM
n = REQUEST ("Name_of_building_material", index, name)
Returns in the variable the building material name identified by index.
This should work for you.
You add the index number and it will tell you the name in the 'name' variable.
So in your case...
n = REQUEST ("Name_of_building_material", 97, name)
PRINT name (or do what ever else it is you want to do with 'name'.
Barry.
2021-10-22 10:42 AM
So close to what I did, but so far! Thanks, works great!