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

Problem with arraytype parameters

Anonymous
Not applicable
Hi,

In a object (auto_dim_a), we have a parameter (ovlp_coords) which is 50X2 Arraytype of APIParT_Length type. We used to have in over master script
ovlp_coords[1][1] = 0.00 : ovlp_coords[1][2] = 0.00
ovlp_coords[2][1] = 1.00 : ovlp_coords[2][2] = 0.00
ovlp_coords[3][1] = 1.00 : ovlp_coords[3][2] = 1.00
ovlp_coords[4][1] = 0.00 : ovlp_coords[4][2] = 1.00
ovlp_coords[5][1] = 0.00 : ovlp_coords[5][2] = 0.00
no_ovlpcoords = 5

parameters no_ovlpcoords = no_ovlpcoords
parameters ovlpcoords = ovlpcoords

now we changed this parameters array size from 50X2 to 150X3 and our master script is changed to like this

ovlp_coords[1][1] = 0.00 : ovlp_coords[1][2] = 0.00 : ovlp_coords[1][3] = 0.00
ovlp_coords[2][1] = 1.00 : ovlp_coords[2][2] = 0.00 : ovlp_coords[2][3] = 0.00
ovlp_coords[3][1] = 1.00 : ovlp_coords[3][2] = 1.00 : ovlp_coords[3][3] = 0.00
ovlp_coords[4][1] = 0.00 : ovlp_coords[4][2] = 1.00 : ovlp_coords[4][3] = 0.00
ovlp_coords[5][1] = 0.00 : ovlp_coords[5][2] = 0.00 : ovlp_coords[5][3] = 0.00
ovlp_coords[6][1] = 0.00 : ovlp_coords[6][2] = 0.00 : ovlp_coords[6][3] = 1.00
ovlp_coords[7][1] = 0.50 : ovlp_coords[7][2] = 0.00 : ovlp_coords[7][3] = 1.00
ovlp_coords[8][1] = 0.50 : ovlp_coords[8][2] = 0.50 : ovlp_coords[8][3] = 1.00
ovlp_coords[9][1] = 0.00 : ovlp_coords[9][2] = 0.500 : ovlp_coords[9][3] = 1.00
no_ovlpcoords = 10

parameters no_ovlpcoords = no_ovlpcoords
parameters ovlpcoords = ovlpcoords

if open a drawing which has this element and we are expecting array like this
0 0 0
1 0 0
1 1 0
0 1 0
0 0 0
0 0 1
0.5 0 1
0.5 0.5 1
0 0.5 1
0 0 1

but array was like this

0 0
0 1
0 0
1 1
0 0
1 0
0 0
0 0
0 1
0.5 0
1 0.5
0.5 1
0 0.5
1 0
0 1

if select that object and we click object selection settings and click OK then the array looks good.

Can any one have this type of problem?
Can any one give me suggestion to fix this problem please.
1 REPLY 1
Anonymous
Not applicable
You could declare array dimensions, and force "ovlp_coords" to update, with a "parameters" statement.
Is it what you are trying to achieve?
if bArrayTest then
	dim ovlp_coords[5][2]
	! your code
else
	dim ovlp_coords[10][3]
	! your code
endif

no_ovlpcoords = vardim1 (ovlp_coords)

parameters no_ovlpcoords = no_ovlpcoords,
			ovlp_coords   = ovlp_coords

Cheers,
Olivier