Skip to content
Josef Prinz edited this page Dec 22, 2022 · 6 revisions


AutomationML Editor API Reference Guide

The Aml.Editor.Plugin.Contract allows to implement editor extensions for the AutomationML Editor. These extensions are loaded as PlugIns into the AutomationML editor at startup. AutomationML editor has been developed by the AutomationML society in order to visualize major AutomationML concepts and provides functionality to visualize, create and edit AutomationML/CAEX files. The AutomationML editor is suited for educational purposes and a perfect entry point for learning, experimenting and understanding AutomationML. However, the number of features and functionalities of the AutomationML editor does not represent the entire modeling scope of AutomationML. AutomationML editor and all related software products are provided by AutomationML e.V. and distributed under the MIT license. PlugIns may extend the modeling capabilities of the AutomationML editor. The here defined PlugIn API can be applied, in courses and lectures to spread the knowledge about AutomationML and to get practice in AutomationML programming. This API, the AutomationML Editor and the AMLEngine, which is the basic API for AutomationML programming, are based on .NET Core.

Getting Started

First ensure, that you have the correct version of the AutomationML editor installed. This version of the PlugIn API can only be used with AutomationML Editor version 5.0.0 and beyond.

The PlugIn API has a dependency to the AMLEngine, which latest version can be obtained from NuGet. To be compatible with the AutomationML Editor installed, the versions of the AMLEngine, used by the Editor and the PlugIn shall be identical.

The Aml.Editor.Plugin.Contract PlugIn API is also distributed over the NuGet Platform.

To get started, you can load the AMLEditorPluginSandbox from GitHub. The Sandbox solution is a Visual Studio Solution which provides basic examples and a testbed for PlugIn development. This solution contains all required resources for PlugIn development. To build the solution, the referenced NuGet packages need to be restored. The Sandbox mimics the AutomationML editor docking manager and PlugIn loader. Please note, that Plugin Development for the AutomationML editor version 6.0 and later is supported with an updated sandbox project.

The basic framework for the deployment of PlugIns is the Managed Extensibility Framework (MEF) from Microsoft. You should have at least a basic understanding of this framework.

PlugIn implementers should follow these steps:  

  • Decide which kind of PlugIn should be offered. There exist different PlugIn examples for different kind of PlugIns which you can use as a template.
  • If no example/ template suits your need, you have to implement one of the defined PlugIn interfaces by yourself, defined in the contract DLL. It is of course possible to implement multiple PlugIn interfaces in a single exported PlugIn.
  • To test your own plugIns within the Sandbox the output of the PlugIn project shall be redirected to the Plugins folder of the Sandbox. Ensure that the DLLs are copied to the execution directory.
  • When the PlugIn is working as you expect it, you can copy the PlugIn DLL to the Installation directory of the installed AutomationML Editor (only for Editor versions before 5.1.3.0). Please ensure that the DLL names are unique. If a DLL with the same name as yours exists, rename your DLL.

    Since AutomationML-Editor version 5.1.3.0 the PlugIn directory is located at the "%AppData%/AutomationMLEditor" roaming application data folder. You can copy the DLLs to the folder or alternatively use the PlugIn Manager of the editor to install the PlugIns. See a detailed description below.

PlugIn Installation (Editor version 5.x.x)

Since version 5.1.3 of the AutomationML Editor, the installation of a PlugIn to be used with the AutomationML Editor is supported by the PlugIn Manager of the AutomationML Editor. For this purpose, the file folder in which the PlugIn is contained must be specified as an additional PlugIn source. The PlugIn Manager can list the PlugIn if a PlugIn contract has been implemented correctly. A listed PlugIn can be installed.

A PlugIn installation is performed exclusively for the local user of the editor. If a PlugIn is to be made accessible to other users, it can be published on NuGet. So that it can be listed by the PlugIn Manager, the published name must consist of the namespace prefix 'Aml.Editor.Plugin.' and the PlugIn name. PlugIns that do not have any author information or description are not listed. A PlugIn without implementation of the 'about' method is also not included.

PlugIn Installation (Editor version 6.x.x)

The installation of a PlugIn to be used with the AutomationML Editor is supported by the PlugIn Manager of the AutomationML Editor. This workflow is intended for making a plugin available to additional users. The plugin must be created as a Nuget package and the Nuget source must be made known in the package manager. The package creation is easily possible in VisualStudio for .NET 5 projects. Note the settings for this in the available examples.

See Also

Other Resources

Version History

Clone this wiki locally