GDL
About building parametric objects with GDL.

Set range for array

JGoode
Advocate

Hello,

 

Is it possible to set a range for individual array fields? On first glance, I wasn't able to even though I can set the range for the parameter as a whole. 

 

Many thanks

ArchiCAD 23

Windows 10
5 REPLIES 5
Lingwisyer
Guru

Just to clarify, you have an array like [ a,] and you want to set a range for just for a, but you have only managed to set a uniform range encompassing both and b. [ x1< a <x2 , y1< b <y2 ] vs [ x1< a <x2, x1< b <x2 

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 

Yes, so I would like to be able to set a range, as in minimum and maximum, so for x[1][1] I might want a different maximum e.g x[1][1] range [0, 1] and x[1][2] range [0, 2]. I currently have it so the range is always the same e.g x range [0, 1]

ArchiCAD 23

Windows 10
runxel
Legend

That is not possibly. You can only set it for the whole array.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Joachim Suehlo
Advisor

Manual says:

If used on an array parameter, the restriction will be applied to all items individually.

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de

The only way is:

Make a dummy parameter which can have a range or list (and it can be switched on demand).

First switch the value basing on selected cell in Your array, then apply the correct value basing on a range. Will work in UI, will not on hotspots...