Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Putting a range on set values

JGoode
Advocate
Hello,

I'd like to be able to put a range on a parameter that has set values.

My values are these:
values "upright_height" 0.71, 1, 1.22, 1.6, 1.98, 2.4
But I want to be able to add a max range of something that might be less than 2.4 so ideally my values would remove the 2.4, how can I add this?

Thanks
ArchiCAD 23

Windows 10
7 REPLIES 7
Barry Kelly
Moderator
Not quite sure I follow what you want but you can add a RANGE option to your VALUE list.
See the example in the GDL manual.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Advocate
For example I might set ceiling height to 2.2m therefore having my upright height at 2.4 doesn't work so I'd like to remove that from my values list. So it was automatically only give me the options of 0.71, 1, 1.22, 1.6, 1.98 and remove the 2.4.

I hope this helps to explain what I'm trying to achieve a bit clearer.

Thanks
ArchiCAD 23

Windows 10
Erwin Edel
Rockstar
Sounds like you need a few IF ... THEN statements to check for the range and then define values.

This would work if ceiling height is a parameter in your object.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
JGoode
Advocate
I knew it would be possible with IF's but I was curious as to if there was a simple way of doing it.

Thanks
ArchiCAD 23

Windows 10
You can use get() in Values* command (without RANGE)...

Piotr
JGoode
Advocate
I haven't ever used this and the reference guide doesn't really explain how to use it. Do you have any very basic examples of how I might use it?

Thanks very much
ArchiCAD 23

Windows 10
Joachim Suehlo
Advisor
PUT 0.71, 1, 1.22, 1.6, 1.98
IF ch >= 2.2 THEN PUT 2.4

VALUES "upright_height" GET(NSP)
Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de