Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 
Design forum

Moving local origin in CALLed objects

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
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago

AC 10 ... 22/24 USA

Didn't find the answer? Start a new discussion


Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!