Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.
SOLVED!

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

Accepted Solutions
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 have been using ArchiCAD continually since ArchiCAD 4.5, 4.5.5, 5, 5.1, 6, 6.5, 7, 8, 8.1, 9, 10, 11, 12, 13, 15, 18, 21, 22, 25, now testing 27
Member of Architalk since 2003, but missed the migration to Graphisoft.
(where have all my original posts gone?)

View solution in original post

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 have been using ArchiCAD continually since ArchiCAD 4.5, 4.5.5, 5, 5.1, 6, 6.5, 7, 8, 8.1, 9, 10, 11, 12, 13, 15, 18, 21, 22, 25, now testing 27
Member of Architalk since 2003, but missed the migration to Graphisoft.
(where have all my original posts gone?)

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

 

JFA