Example
| by: | Sebastian Beutel, February 2019 |
|---|---|
| published: | here |
| description: | set an icon as legend |
| remarks: | This refers to the icons which are in the library on the very machine. On the PC suite they are stored in C:\Users\…\AppData\Roaming\Avolites\Icon Library\Archive\Factory. To get a specific file, the Avolites Showfile Parser might help (upload a show and hit Show Legends). |
<?xml version="1.0" encoding="utf-8"?> <avolites.macros> <macro name="Set Icon as Legend" id="Macros.SetLegend.Icon"> <sequence> <step>Handles.SetSourceHandle("Colours", 0)</step> <step>Icons.StoreIcon("1caf5766-67e1-41a0-aec4-dc821f1c160a", "Expert.Legend.Set.Generic.PendingTitanId")</step> <step>Handles.SetIcon(Expert.Legend.Set.Generic.PendingTitanId)</step> <step>Handles.ClearSelection()</step> </sequence> </macro> </avolites.macros>
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
Handles.SetSourceHandle(“Colours”, 0) selects a handle to set its legendIcons.StoreIcon(“..”, “..”) makes sure the icon is stored in the showfile, and gives it a new TitanId. This returned in the property which is passed as 2nd parameter - here: Expert.Legend.Set.Generic.PendingTitanIdHandles.SetIcon(…) finally sets this imported icon, identified by its Id, as legend for the selected handleHandles.ClearSelection() finally deselects the handle