Class to get information on the currently running macro More...
strring | filename() |
bool | isAutostart() |
string | trigger() |
Class with only static members to get infos on the durrently running macro
Example:
if (! macro::isAutostart()&&(macro::filename()!="")){
setup::autostartMacro=macro::filename();
if (!setup::autostartMacroTrigger.contains("layoutOpen")) setup::autostartMacroTrigger.insert("layoutOpen");
return 0;
}
// if this macro was triggered by an layout open event, check file folder for an second level autostartmacro
if (macro::trigger()=="layoutOpen") {
//.....
}
This class exists only for the LayoutEditor C++ Macros. It is not available in the other interfaces, as there are native ways for this features. This class was introduced with release 20201021.
Returns: the complete filename includ its full path of the macro calling this function
Returns: true if the execution of this macro was triggered by an event like layout open. Otherwise false is returned.
Returns: the name of the event triggering this macro. Supported events are: layoutOpen, layoutStart, layoutNew, schematicNew