Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
SOLVED

C++ Engine Plugin with HTML GUI

tchard
6 - Meteoroid

Is it possible to use plugins developed in C++ for Alteryx with the HTML GUI SDK? 

I've got the dll already working with some C# code to do the registration.  But now would like to use the HTML GUI SDK instead of C#.

I've looked at all the examples in the SDK I've got here but haven't been able to get anything to load up into Alteryx ( yet ).

This is a cleaned up version of the config file I'm trying to use:

 

 

 

 

<?xml version="1.0"?>
<AlteryxJavaScriptPlugin>

	<EngineSettings 
		EngineDll="C:\Program Files\Alteryx\bin\Plugins\MyPlugin.dll"
		EngineDllEntryPoint="MyToolConstructionFunction"
		SDKVersion="10.1"
		/>

  <GuiSettings Help="" Html="Gui.html" Icon="Icon.png" SDKVersion="10.1">
    <InputConnections>
      <Connection Name="Input1" AllowMultiple="False" Optional="True" Type="Connection" Label="A"/>
    </InputConnections>
    <OutputConnections>
      <Connection Name="Output" AllowMultiple="False" Optional="True" Type="Connection" Label="B"/>
    </OutputConnections>
  </GuiSettings>
  <Properties>
    <MetaInfo>
      <Name>My Hybrid plugin</Name>
      <Description>Description goes here</Description>
      <CategoryName>SDK Examples</CategoryName>
      <SearchTags></SearchTags>
    </MetaInfo>
  </Properties>
</AlteryxJavaScriptPlugin>

 

 

 

Putting the config xml in the "C:\Program Files\Alteryx\bin\HtmlPlugins\MyPluginFolder" and the tool icon wouldn't appear in Alteryx at all.

I can get Alteryx to display the tool icon when the Config file is located here: 
D:\Users\<username>\AppData\Roaming\Alteryx\Tools\MyPlugin\ 

But then shows an error message: "Can't find plugin "C:\Program Files\Alteryx\bin\Plugins\MyPlugin.dll" when I try to use the Transformer.

Is there any sample syntax that demonstrates HTML GUI SDK invoking a C++ plugin? 
Or something I'm missing in the syntax I'm trying to use above? 

4 REPLIES 4
tlarsen7572
11 - Bolide

I use DLLs with the HTML GUI SDK frequently.  They aren't developed in C++, but that should not matter - a DLL is a DLL.

 

Here is the config of one of my DLL tools:

<?xml version="1.0"?>
<AlteryxJavaScriptPlugin>
  <EngineSettings EngineDll="go_tools.dll" EngineDllEntryPoint="CleanNulls" SDKVersion="10.1" />
  <GuiSettings Html="clean_nulls.html" Icon="clean_nulls.png" Help="" SDKVersion="10.1">
    <InputConnections>
      <Connection Name="Input" AllowMultiple="False" Optional="False" Type="Connection" Label=""/>
    </InputConnections>
    <OutputConnections>
      <Connection Name="Output" AllowMultiple="False" Optional="False" Type="Connection" Label=""/>
    </OutputConnections>
  </GuiSettings>
  <Properties>
    <MetaInfo>
      <Name>Clean Nulls</Name>
      <Description>Converts string fields to empty strings, numbers to 0, bools to false, and leaves the other fields alone.</Description>
      <CategoryName>ayx_builders</CategoryName>
      <SearchTags>go, sdk</SearchTags>
      <ToolVersion>1.00</ToolVersion>
      <Author>tlarsendataguy</Author>
      <Company></Company>
      <Copyright>2020</Copyright>
    </MetaInfo>
  </Properties>
</AlteryxJavaScriptPlugin>

 

A couple of points:

  • Don't specify the full path to the DLL
  • Alteryx expects the DLL to be in the bin\plugins folder in the installation directory, so make sure it is there.
  • Put the config file and HTML files into the D:\Users\<username>\AppData\Roaming\Alteryx\Tools\MyPlugin\ folder

With those few adjustments your plugin should work just fine.

tchard
6 - Meteoroid

Thanks for the reply tlarsen,

 

I tried as suggested.  Using a relative directory does overcome the error with "Can't find plugin..." (yay).   I still need to write some javascript code to configure the tool before I'll know if it's working though(soon).

But, I do seem to be having a problem getting Alteryx to recognize any new plugins I create by manually creating folders in the 
D:\Users\<username>\AppData\Roaming\Alteryx\Tools\ folder

The only thing working so far for me is the HTML_GetSet_Example.  After installing the .yxi, I altered the HTML_GetSet_ExampleConfig.xml to point to my own dll in the plugins folder. I altered the metainfo to have the tool and icon appear in my own category, and, with relative path to the dll folder, it loads into Alteryx without error ( using D:\Users\<username>\AppData\Roaming\Alteryx\Tools\HTML_GetSet_Example  )

I installed that example using the .yxi file.

But, it seems any attempt to manually create a folder in D:\Users\<username>\AppData\Roaming\Alteryx\Tools\MyNewTool  and Alteryx doesn't appear to load the tool icon.  No error messages.  But no new tool icon either.

(This is on an AWS workspace with latest Alteryx Designer installed yesterday.  Today I'll try a normal desktop environment in case that's a factor).

1. Do I need to create a .yxi to have Alteryx recognize my plugins in the AppData roaming folder?

2. Are there any registry settings required?  ( I assume no, but can't seem to get Alteryx to recognize my plugins ). 

tlarsen7572
11 - Bolide

In short answer to your questions:

  1. A yxi is not required.  It is simply a convenient installer for users of your custom tool
  2. No registry settings should be required

 

Setting up a plugin with a DLL engine has 2 parts.  The first part is the config and UI.  The folder for the tool config I posted earlier looks like below.  The major point to note is the name of the config file: The config file should start with the name of the folder and end with 'Config'.  So my config file is called 'clean_nullsConfig.xml'.  Your config file might be called 'MyNewToolConfig.xml'.

Plugin folder.JPG

 

The second part is the DLL file, which needs to be installed in the bin\Plugins folder in the installation folder.  Here is a screenshot of my Plugins folder:

Bin folder.JPG

 

If your folder and file names are correct and your config file is properly set up, you will see the custom tool in the toolbar.

tchard
6 - Meteoroid

Thanks tlarsen,

 

Oh... it has to end in Config!  That's what I'm missing!  Thanks, that worked!

Also, I should mark your first response as accepted answer, apologies for digression.   For that original problem, the dll directory location, I'd been specifying it as a relative path to get from HtmlPlugins folder over to plugins folder ( eg: "..\Plugins\MyPlugin.dll").  When I hit problems, tried with absolute path.   It's certainly finding the dll now using the answer from your first response ( that the assumption is the folder is relative to the Plugins folder inside bin ).


Could be I get this sorted today ( need to fix up some other problems in passing config to the plugin first though ).


Thanks again for the response, tlarsen!