Moving local origin in CALLed objects
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-10-05 07:12 PM
2015-10-05
07:12 PM
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 rotzzIn the macro do:
END addxx, addyy, addzz, rotzz, etcHTH.
0 REPLIES 0