License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
2022-01-12 04:47 AM
I have a 2D Parameter array in object A which is formatted as Array [m][n] but in object B when I use REQUEST I end up with Array [1][m x n] in the imported array and dim1 & dim2 values. Any suggestions why this is happening before I transfer the values into a new 2D array?
Solved! Go to Solution.
2022-01-12 11:44 AM
@SenecaDesignLLC Thanks for the response, I guess I should spend a bit more time with the manual...
p_values: for ASSOCLP_PARVALUE returns the parameter value or array of values. The array elements are returned successively, row by row as a one dimensional array, independently of the dimensions of the variable specified to store it. If the variable is not a dynamic array, there are as many elements stored as there is room for (for a simple variable only one, the first element). If values is a two dimensional dynamic array, all elements are stored in the first row.
2022-01-12 09:18 AM
This is a complicated question (kind of) but seems relevant to the code, can you post something or an image with more info? Debugging is difficult with such minimal information.
2022-01-12 11:32 AM
Things are pretty much as I suggested above, but I will try to expand.
In Object A (subtype: Wall) I have a parameter array MyArray[m][n] which is correctly reporting changes & values of real numbers.
In Object B (subtype: Label) I want to import that array so I use...
MASTER SCRIPT:
n = REQUEST ("ASSOCLP_PARVALUE", "MyArray" , name_or_index, type, flags, dims1, dims2, MyArray)
MyArray = MyArray
PARAMETERS MyArray = MyArray
!dims1 & dims2 correctly supply values m & n
!but
!VARDIMS1(MyArray) = 1 & VARDIMS2(MyArray) = m * n
The MyArray[m][n] parameter values in Object B aren't updating, but that may be a different issue.
In Object B if I want to use the values in MyArray I have to use Value = MyArray[1][m x n].
2022-01-12 11:44 AM
@SenecaDesignLLC Thanks for the response, I guess I should spend a bit more time with the manual...
p_values: for ASSOCLP_PARVALUE returns the parameter value or array of values. The array elements are returned successively, row by row as a one dimensional array, independently of the dimensions of the variable specified to store it. If the variable is not a dynamic array, there are as many elements stored as there is room for (for a simple variable only one, the first element). If values is a two dimensional dynamic array, all elements are stored in the first row.
2022-01-12 03:35 PM
Yeah, you found the critical text.
Btw same holds true for macro returns, and returns from any GDL Addons. The returned array will be always one-dimensional.