GDL
About building parametric objects with GDL.

Making a Macro

henrybs14
Contributor

So I'm reading the guides how to make a macro, and there's something that is confusing me. Can a macro not be defined inside my object that I'm writing? The only example I could find as it as a seperate object?

Is this the only way to define a macro?

 

Thanks guys!

1 REPLY 1
Barry Kelly
Moderator

That is all a macro is - a separate object.

It can be nominated as un-placeable so you don't see it when browsing the library.

 

BarryKelly_0-1712218682707.png

 

 

You can script exactly the same inside the original object, but it will not be accessible to any other object.

If you need to use it more than once in your object, make it a subroutine (GOSUB).

 

But if you want to use the same code in many objects, save it as a separate object and CALL it as a macro.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11