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

How to insert Array Values?

Anonymous
Not applicable
Hello everyone! I want to insert 10 arrays into this parameter. I have tested many ways to fail. I don't know what it does, please help me, thank you all.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

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

View solution in original post

4 REPLIES 4
Barry Kelly
Moderator
Select the row button and then insert as many as you need.
You can then select the values for each and add a default value if needed.

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
Anonymous
Not applicable
hi Barry Kelly !

Can I insert it in a 2D script? I want to use it to control the X coordinate but I cannot determine the number of points.
Solution
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

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
Anonymous
Not applicable
Thank you for helping me solve the problem