C++ SDK

Version:
Current
Last modified: January 27, 2020

Use the Alteryx C++ SDK to write custom Alteryx plugin tools using C++. This means you can use the C++ SDK to access core elements of the AlteryxEngine framework.

Prerequisites

Creating a custom tool with a C++ back end involves working with an SDK. For this reason, we assume you are familiar with:

  • C++
  • File management

SDK Use

To use the C++ SDK when creating your tool's back end, you need to create a C++ file. The file name should relate to the tool name, and the file needs to be saved in the tool folder.

\MyNiftyPlugin\MyNiftyPluginEngine.cpp

This file needs to use data gathered from the data stream and manipulate the data in accordance with the user input from the tool's GUI. It is recommended that you create the front end first to connect to the tool's data items. If you have not already created the front end, see HTML GUI SDK or Macro.

The C++ SDK uses a template class that easily manages the information necessary to call a tool’s entry point, including:

  • A unique id
  • A pointer to the EngineInterface struct
  • The XML data of the tool configuration
  • An empty PluginInterface struct

The entry point then fills the empty PluginInterface struct with pointers to each of five methods that are required for the tool to run.

If the tool also processes data, Designer calls the AddIncomingConnection method. The tool must fill in an IncomingConnectionInterface struct with pointers to each of four methods used to process data.

Recompiling a Code

To recompile a code, proceed with the following function signatures.

  1. FieldSchema.h:
    1. FieldSchema(const StringNoCase strFieldName, E_FieldType ft, unsigned nSize, int nScale, String strSource = String(), String strDescription = String())
    2. FieldSchema(const StringNoCase &strFieldName, E_FieldType ft, unsigned nSize, int nScale, String strSource = String(), String strDescription = String()
  2. FieldBase.h:
    1. FieldBase(const StringNoCase strFieldName, E_FieldType ft, const int nRawSize, bool bIsVarLength, int nSize, int nScale);
    2. FieldBase(const StringNoCase& strFieldName, E_FieldType ft, const int nRawSize, bool bIsVarLength, int nSize, int nScale).

Build your own Tool Checklist

  •  

Create a folder with the name of your tool. See Build Custom Tools.

  •  

Create icon and save it inside the tool folder. See Build Custom Tools.

  •  

Create a GUI file and save it inside the folder. See HTML GUI SDK.

  •  

Create your back end and save it inside the folder. See C++ SDK, Macro, and Python SDK.

  •  

Create a configuration file and save it inside the folder. See Tool Configuration File.

  •  

Create a package configuration file and save it with the folder. Package a Tool.

  •  

Package the package configuration file and tool folder as a yxi. See Package a Tool.

Was This Helpful?

Need something else? Visit the Alteryx Community or contact support.