Method GetMacroByPath
GetMacroByPath(string)
Gets a macro by its path. Throws an exception if not found.
Declaration
IMacroAccessor GetMacroByPath(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path of the macro, either absolute or relative. |
Returns
| Type | Description |
|---|---|
| IMacroAccessor | The macro at the specified path. |
Examples
try
{
var macro = AuraTree.GetMacroByPath("MyProject/Macros/Macro1");
Log.Info("Macro found!");
}
catch (NotFoundException)
{
Log.Info("Macro not found.");
}