Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

GDL
About building parametric objects with GDL.

Set range for array

JGoode
Expert

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-28 AUS 3110Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 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
Hero

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

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | 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»
Jochen Suehlo
Moderator

Manual says:

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

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . 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...