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.

Simple array

Anonymous
Not applicable
Hi!
I would like to create an object that consists of few blocks placed in a row (with a number of loop steps defined by a user).
Then I would like to make it editable, so that user could pick whichever block to be replaced by a different shape (for instance a lower block).
I assume that in order to produce such an object I have to use an array.

Can anyone explain me how to use an array by means of this example?

I have started with this, but I have a feeling that I'm not even close...

!!!!!3d script

DIM arrayB[]


FOR i=1 TO nr

IF arrayB= 'caly' THEN
BLOCK 1,1,1
ELSE
BLOCK 1,1,0.5
ENDIF

addx 1.5

NEXT i

!!!!!parameter script:

VALUES 'arrayB' 'caly', 'polowa'
VALUES 'nr' RANGE[1,10)
2 REPLIES 2
jasiek772 wrote:
Hi!
I would like to create an object that consists of few blocks placed in a row (with a number of loop steps defined by a user).
Then I would like to make it editable, so that user could pick whichever block to be replaced by a different shape (for instance a lower block).
I assume that in order to produce such an object I have to use an array.

Can anyone explain me how to use an array by means of this example?

I have started with this, but I have a feeling that I'm not even close...

!!!!!3d script

DIM arrayB[]


FOR i=1 TO nr

IF arrayB= 'caly' THEN
BLOCK 1,1,1
ELSE
BLOCK 1,1,0.5
ENDIF

addx 1.5

NEXT i

!!!!!parameter script:

VALUES 'ciag' 'caly', 'polowa'
VALUES 'nr' RANGE[1,10)


you have the right idea, but there is quite a bit more needed. If i can muster some time ill see if i cant make it work how you are attempting.
Anonymous
Not applicable
ok, that would be great!

I have noticed that if I remove 'DIM arrayB[]' then it works, but then of course the dimension of an array is limited, and it is equal to the number of rows stated during creating the parameter, so it is not a dynamic array...
Learn and get certified!