Skip to main content

Macro

Important

The HTML GUI SDK uses outdated technology that limits your extension opportunities. We've built a new Platform SDK using Python and the latest open-source technology to deliver a vastly improved development experience. Go to Platform SDK to get started!

Use an Alteryx Designer Macro and the HTML GUI SDK to set up an existing macro as an engine component. Connect data items to interface tools, and match the names of the data stream connections to the Macro Input and Macro Output tools.

Prerequisites

To create a macro back end for a custom tool, we assume you are familiar with...

Set Up Files

  1. In the directory of your tool, add a folder named /Supporting_Macros. This gives your tool access to the macro and prevents it from showing in the macro directories, in Designer.

  2. Place an existing macro in the /Supporting_Macros folder.

  3. In the Config.xml file, set the EngineSettings attribute EngineDllEntryPoint to the relative path to your macro. Set the attribute EngineDll to Macro.

<EngineSettings EngineDll="Macro" EngineDllEntryPoint="HtmlToolName\Supporting_Macros\MyMacro.yxmc" />

Go to Tool Configuration File for more information.

Connect Data Items to Interface Tools

  1. In your tool's config.xml file, set the name attribute of the data item.

  2. In Designer, select the corresponding Interface tool. In the Configuration window, access the Annotation tab, and change the tool name to match the name given to the data item.

  3. Verify that the terms match.

    • Use the XML View tab for the interface tool within the macro.

    • Check the connection name in the XML configuration file. Go to Getting Started with Developer for more information.

Tool Component

XML Example

DataItem referenced in the HTML GUI page

<Value name="username"></Value>

Corresponding interface tool XML

<Name>username</Name>

Match Data Stream Names

For each incoming or outgoing connection in your tool, your macro must have a corresponding Macro Input or Macro Output tool.

  1. In your tool's config.xml file, set the name attribute of the connection.

  2. In Designer, select the corresponding Macro Input or Macro Output tool. In the Configuration window, access the Configuration tab, and change the tool name to match the name given in the name property of the connection within your tool's config.xml file. Go to Tool Configuration for more information.Configuration de l'outil

  3. Verify that the terms match.

    • Use the XML View tab for the Macro Input or Output tool within the macro.

    • Check the connection name in the XML configuration file. See Getting Started with Developer.