Table of Contents

Example

Macro - Export Macro

by: Gregory Haynes, Jan 2016
published: http://forum.avolites.com/viewtopic.php?f=20&t=4361#p15847
description: exports macro no.1 as file in the usermacro location

functions

Code

ExportMacro.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
  <!-- Macro to export another macro. Gregory Haynes 13/02/2016 -->
  <macro id="Avolites.Macros.ExportMacro" name="Export Macro Number 1">
    <description>Exports the macro with user number 1.</description>
    <sequence>
      <step>UserMacros.SetCurrentMacroFromUserNumber(1)</step>
      <step>UserMacros.Export(UserMacros.CurrentMacroId)</step>
    </sequence>
  </macro>
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

See also http://forum.avolites.com/viewtopic.php?f=20&t=5733 for hints on exporting more macros.

How to use it

  1. create another macro and give this macro usernumber 1
  2. find the Export macro in the show library or via <Macro> [View All] and execute (click) it
  3. open Windows explorer and navigate to your usermacro location
  4. there you'll find a file named Macro1.xml - this is the exported macro