I am trying to make objects that are swept through an user-given polygon, like railings. Since it doesn't seem to be possible to give the GDL a polygon as a parameter I gave it through an array (of points). But I can give it only a pre-limited number of points (ie. 4, or 5 or 20 points alltogether).
The GDL docs says that parameter arrays are dynamic by default, that is they can be extended, and it works. But the parametric arrays' stored size cannot be changed, and I cannot change in the parameter window.
Is it possible to change the parameter array's size somehow?
You definitely cannot do out of bounds indexing of array parameters for reading in the 2D/3D scripts.
But you absolutely can do the following in the parameter script:
if max (gs_sh, gs_sho, gs_shu) > vardim2(gs_horGridY) then
parameters gs_horGridY[max (gs_sh, gs_sho, gs_shu)] = 0
parameters gs_horGridBegX[max (gs_sh, gs_sho, gs_shu)] = 0
parameters gs_horGridEndX[max (gs_sh, gs_sho, gs_shu)] = 0
(the code snipplet is from the standard German AC windows)
In other words: you can extend your array parameters by simply setting the last item to create.
Decreasing the size of the array (which is a much rarer need) can be done by creating a new smaller array, copying the necessary values and setting the array parameter to the new array using the PARAMETERS command.
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...