BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

How to lock the values of an array parameter ?

Nader Belal
Mentor
Hi there,

I have a number of array parameters that are used for graphical editing hotspots, and I need to know how to block the values in the array parameter so that it doesn't change if a certain circumstance is met ?

I have already been able to make it with normal parameters as shown in this thread.
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
1 REPLY 1
Podolsky
Ace
You cannot lock part of array or apply specific range of variables for part of array - only to whole array.

To solve this problem I wrote a script, where first I'm creating temporary array

DIM TempArray[]

then using FOR - NEXT program goes through each array value, checking specific condition and if it's okey - copy it's value to temporary array.

TempArray[ i ] = MyArray[ i ]

If the condition is false, let say one editable hotspot exceed it's range, let say A>1.00 - program writes into array that A=1.00

IF MyArray[ i ]>1 THEN TempArray[ i ]=1

After loop went though all array, I use

MyArray = TempArray
PARAMETERS MyArray = MyArray
Learn and get certified!