BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Passing parameters to macros and effectivity

Anonymous
Not applicable
Hello all,
How much does the nested macro calls affect the responsiveness of the object?
I mean that if you have ten arrays of [50][150] in the first objects and you pass them to the first macro and then to the nested second macro, does such operations take more memory and time than if you would try to limit the arrays passed to the subobjects?
(like 10 items of one dim array of [150] instead of 10 items of [50][150] )

Hope I'm clear enough

Thanks in advance,
Olivier
3 REPLIES 3
ztaskai
Graphisoft Alumni
Graphisoft Alumni
I'm afraid this should be tested to get a definite answer:(

According to the macro calling logic in ArchiCAD, the size of the arrays should matter much less than the amount of parameters and the order of parameters. Passing each parameter does a name based search for the actual parameter in the parameter list of the called macro and a copy of values. This search used to be a relevant factor in macro calling speed in ArchiCAD. This search has been improved for AC13 a lot but having less parameters will make things faster - that's for sure.

In general, I think having fewer but bigger arrays is better if the overall size is the same.

HTH,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Thanks Zsolt for the clear and honest answer!
If i get it right then I can conclude that:
1- bigger arrays are no big deal
2-using the old CALL method giving parameters by order rather than by name can make things faster
That's good to know!
I'll try to adapt my script to this,
kind regards,
olivier
ztaskai
Graphisoft Alumni
Graphisoft Alumni
1 - Basically, yes.
2 - I prefer the macro call syntax with named parameters since you lose track very soon with many parameters the other way - not to mention the case of intentionally omitting parameters. I just suggest you to keep the named parameters in the order of the definition to speed up the pairing up.

Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Learn and get certified!