The question is on using the [Engine.WorkflowDirectory] “constant” inside a macro. I would like it to return the directory of the macro, and not the directory of the workflow that called the macro. Or, I would like a work-around to accomplish the same thing: The macro needs to know where the end-user put the macro. (because I’m packaging dependencies with it, and relative references are not working).
To illustrate the issue, I have created a simplified example.
Download the YXZP, double click to extract / open.
Right click on the marco, select "Open Macro:...".
Run the macro once. Inspect the output.
The output is the location of the Macro. This is what I want! So far so good!

Close the macro. Now run the yxmd file “Call Example Macro.yxmd”. Inspect the output coming out of the S anchor:

The path shown is the path of the parent workflow calling the macro, not the path of the macro itself.
I’m developing a larger application that depends on knowing where the end user has put the macro.
So finally, my question… How do we develop a macro in which we can reference the macros location inside the macro itself?
If you’re wondering why I need this, it is a much larger conversation. So, I just wanted to post a boiled down example and see where the conversation goes.
Thanks for your support!