I hope this will help.
-------------------------------------------
We need to add 2 parameters:
spa_max ---- Max. Spacing.
mat ----------- Materials array
-------------------------------------------
-------------------------------------------
!!!!! In Master Scripts
nx=CEIL(a/spa_max) !!number of repeating OBJ in x-direction
ny=CEIL(b/spa_max) !!number of repeating OBJ in y-direction
spacing_x=a/nx !!actual spacing in x-direction
spacing_y=b/ny !!actual spacing in y-direction
PARAMETERS mat[nx+1][ny+1]=0 !!To increase Array size
-------------------------------------------
-------------------------------------------
!!!!! In 3D Scripts
FOR i=1 to nx
FOR j=1 to ny
MATERIAL mat
ADD (i-1)*spacing_x, (j-1)*spacing_y, 0
PRISM_ 4,0.01,
0,0,15,
0,0.1,15,
0.1,0.1,15,
0.1,0,15
DEL 1
NEXT j
NEXT i
-------------------------------------------
Howard Phua
Win 10, Archicad 19 INT