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.

problem with macro call

Anonymous
Not applicable
i made an object wich use macro but it don't work like i want.


this macro is used to make the substract of two polygons, but the returned polygon is wrong.

first i thought that the problem were on my macro script, so i took the values that the first object send to the macro, and put it on macro's parameters to test it.

but the macro used single calcul correctly the resulting polygon.
i used excactly the same values, and no other parameter is used.

so i thought that the problem coulb be in my parameters name, cause the parameters name of my macro were the same that the object parameters. so it was possible that they interfer.

i renamed the parameters but it still don't work.

i want to know if someone have allready have this problem
and
how can i solve it ?
3 REPLIES 3
Anonymous
Not applicable
i solve my problem, i don't know how but it's working.....

if anyone have also an idea about what can give this sort of problem...
Anonymous
Not applicable
If "FileA.gsm" is retrieving a Macro from "FileB.GSM", then the number of parameters have to match in both files.

Example: "FileB.gsm" which is the Macro file has Parameters: A, B & Testvar. "FileA.gsm" which calls the macro has to call ALL 3 of those parameters (none can be left out), so "FileA.gsm" would call the Macro via the code:

CALL "FileB" PARAMETERS A=A, B=B, Testvar=Testvar

(Also, in the CALL command, do not put the GSM extension. In other words, it would be CALL "FileB", not CALL "FileB.gsm").

If you wanted 3 parameters with different names in "FileA.gsm" to match 3 separate names in "FileB.gsm", you can do that as well.

For example: "FileA.gsm" has 3 parameters named ObjectW, ObjectH & ObjectD. "FileB.gsm" still has the parameters A, B & TestVar. Then the following would be the way to call it:

CALL "FileB" PARAMETERS ObjectW=A, ObjectH=B, ObjectD=Testvar.

The parameters in both files have to be the same type. If parameter ObjectW is a Material parameter, then A has to be Material parameter.

Hope this helps.
Anonymous
Not applicable
Hello,

All this is explained in the manuals and libraries are filled with working examples...I think you should post your objects if you are in hurry. Without
them it takes a lot of time to guess what is wrong or why it is suddendly working.

Regards, Juha
Learn and get certified!