GDL
About building parametric objects with GDL.

Masterend in Macro does not allow to pass parameters

Jochen Suehlo
Advisor

I created a simple Macro, where I needed to define different variables which should be passed to the Caller. This works fine with the following Script:

 

! Macro
butter = "Apple"
END butter 

! Caller
CALL "var_define" PARAMETERS RETURNED_PARAMETERS butter
TEXT2 0, 0, butter

 

But I need to write different other scripts as well in the macro (UI, 2D, Parameter, etc.)
For this reason I have to define a "MASTEREND" in the Master-Script, because otherwise the other scripts would not be executed, because of the "END" in the Master-Script.
But now the following script does not work: the variable "butter" and its value is not passed to the Caller.

 

! Macro
butter = "Apple"
GOTO "Masterend"
END butter 
"Masterend":

! Caller
CALL "var_define" PARAMETERS RETURNED_PARAMETERS butter 
TEXT2 0, 0, butter

 

Any ideas to solve this problem?

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
2 REPLIES 2
Peter Baksa
Graphisoft
Graphisoft

Hi,

 

the end statements need to be duplicated in each script which wants to return a value.

! Macro master
butter = "Apple"

! Macro 2D
! no code
END butter 

! Macro 3D
! lots of code
END butter 

! Macro UI
! no code, return value not used in caller - leave empty

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Jochen Suehlo
Advisor

Thank You Peter, I will test it.

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de