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

Script Length

Anonymous
Not applicable
I have created a couple of super window parts and the script that corresponds to the part is quite lengthy. I have put all the window sizes and grilles, colors etc. in the script. The script checks out OK but when I use the part it doesn't always work. I have tried breaking it up into sub routines, but it still has problems. I guess my question is: Does the length of the script affect how a part works? Or where in a script a statement is made? Thanks.

Barry Halloran
7 REPLIES 7
Anonymous
Not applicable
I know you can't have more than 8 variables in an if statement. I had to cut some of mine in half. No doubt there are other maximums.
Frank Beister
Moderator
I have written some objects with about 2.500 lines total and >500kB without implemented picts. And they work fine. I don't think there's a reachable limit of script length.

@Barry:
if a<5 and b<7 and c=0 and d=0 and e<15 and f>-2 and g>-8 and h>-15 and i<25 then print "it works"
works fine. I don't know about limitations in the if .. then statement.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Frank Beister
Moderator
There are limitations in the length of lines. It's about 240 characters max. Maybe this is a problem.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
F. wrote:
I don't know about limitations in the if .. then statement.
I confirm. No limits for "if ... then" statements.
Max length line is 255 characters, including spaces.
GS recommends max 120 for lines, and 31 for file names.
The number of parameters is limited to 512.
Frank Beister
Moderator
The number of parameters is limited to 512
AC 8.x+ 512 parameters
AC 7 128 parameters (AFAIR)
AC 6.x 64 parameters (AFAIR)

This are the silent improvements in GDL. I have had some trouble with a few objects in AC 6, because I needed more than 64 parameters. But there was a trick to use Arrays as storage and a couple of multiple used normal parameters to push the values by an user interface and the parameter script into the arrays.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
F. wrote:
This are the silent improvements in GDL. I have had some trouble with a few objects in AC 6, because I needed more than 64 parameters. But there was a trick to use Arrays as storage and a couple of multiple used normal parameters to push the values by an user interface and the parameter script into the arrays.
Workarounds, always workarounds.
With the time, we have learned how to become Masters in workarounds.
F. wrote:
The number of parameters is limited to 512
I must admit i didn't try to test this limit.
Frank Beister
Moderator
With the time, we have learned how to become Masters in workarounds.
... and how to make impossible things work. 😉
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm