cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Moving local origin in CALLed objects

matjashka
Advocate
First of all, I apologize because I first typed this post and then resolved my own question. I'm just leaving it here in case somebody has that question in the future.

I'd wanted to CALL a series of macros in the way that each macro moves the origin in the caller object, making it ready to attach another macro. In other words, I want the macro to calculate the new origin instead of having to do it by hand. Imagine a LEGO block with one base hole and one knob, ready to attach another block to it. The problem is that in GDL, the caller resets the origin after exiting the macro.

The solution turned out to be using the RETURNED_PARAMETERS option in the macro call, but the macro needs to pass those parameters during EXIT.

In the caller do something like this:
CALL my_custom_macro PARAMETERS something=1, etc_etc=2 RETURNED_PARAMETERS addxx, addyy, addzz, rotzz, etc
ADD addxx, addyy, addzz, etc
ROTZ rotzz
In the macro do:
END addxx, addyy, addzz, rotzz, etc
HTH.
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
0 REPLIES 0