BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.

How to change the dimensions of an array parameter?

Anonymous
Not applicable
The API DevKit documentation for API_AddParType structure states:
For parameters with array modifier, you can change the dimensions of the array on the fly when you create or modify an element. This enables you to put just a placeholder for an array into the library part parameter, and adjust that when you actually place the library part.
Are there any examples of how to do this? Let's say I have a GDL library part with single array parameter. How can I change the dimensions of the array to be [3][30]?

Your help is much appreciated!
2 REPLIES 2
Ralph Wessel
Mentor
EzPresso wrote:
Let's say I have a GDL library part with single array parameter. How can I change the dimensions of the array to be [3][30]?
What happens if you call APIAny_ChangeAParameterID and specify the array indices as 3 and 30? Hopefully it will automatically expand the array bounds.

The alternative (which we use) is to work directly with the underlying memo structures, but that's very long-winded.
Ralph Wessel BArch
Anonymous
Not applicable
Thanks for your answer!
Ralph wrote:
What happens if you call APIAny_ChangeAParameterID and specify the array indices as 3 and 30?
I tried your suggestion. Unfortunately the array bounds are the same. Seems the only way is to work directly with memo.
Learn and get certified!