Got a minute? We appreciate your feedback:

Graphisoft Learn survey
Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.

How do I extract the number of rows in a dynamic array?

jfa_ra
Contributor

I am trying to modify the Wall Framing Object to provide the number of studs as a parameter that can be scheduled.  Based upon my review of the gdl code, it appears that the row count of the array for "stud" parameter provides the desired data.  There seems to be some counter subroutines that build the size of array.

 

Any suggestions for revisions to the gdl code to turn the row count of the array to a parameter that can be called in a schedule?

 

Regards,

 

jfa_ra

Archicad since 8.0

1 ACCEPTED SOLUTION
2 REPLIES 2

Solution
AllanP
Advocate

Hi,

You would have to make a parameter that the schedule could see, say "Number_of_studs"

 

then use the VARDIM1() or VARDIM2() command to read the size of the array and set it to the new parameter. (I don't know if its a 1 or 2 array)

 

Number_of_studs = VARDIM1(Stud)

parameters Number_of_studs = Number_of_studs

hideparameter "Number_of_studs"

 

in the scedules "Scheme setting" add field based on  "Library part Parameters"

AllanP_1-1671404463741.png

 

 

select the library it is in, find the "Wall framing" library  part, then it will display the new field in the list,

"add" it to the "Selected parameters" list

AllanP_2-1671404689229.png

Note:

use the "hideparameter" in the script, using the cross beside the parameter in the parameter window will mean it does not show up in the available parameters list.

AllanP_3-1671405196309.png

 

 

I hope this helps.

 

 

I am up to page 4,152 of Archicad 27 Reference Guide, (Bluebeam Connection), but i got to read it all 😞
don't tell 'em i cheated by reading the last page first to see how it ends 🙂

Sweet! That is exactly the help I was seeking.  Thank you for the quick, detailed response!

 

JFA

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!