To create a plugin, you must create a Visual Studio class library project and compile this as a DLL which can be executed by XIA Automation Server.

In the following example, the plugin is created using Visual Studio 2010 using the C# language.

1. Create a new Visual Studio project

2. Create a new Class Library using the C# or VB.NET language and the .NET Framework 3.5

3. Add references to the following files that can be found in the XIA Automation Server directory (by default C:\Program Files\CENTREL Solutions\XIA Automation Server\Server\bin).


4. Rename the default class file class1.cs to CustomPlugin.cs

5. Modify the code in the class file with the following:

using System;
using CENTREL.XIA.Automation.Agents;

using CENTREL.XIA.Automation.Model;

/// <summary>
/// This is a sample plugin
/// </summary>
public class CustomPlugin : PluginBase

       /// <summary>
       /// Implements the name of this custom plugin
       /// </summary>
       public override string Name
               get { return "Custom Plugin"; }

       /// <summary>
       /// Enter the custom code within the execute method
       /// </summary>
       public override void Execute()
               OnAgentStatusChange("Plugin starting...");
               OnAuditAction("Performed an action", AuditEntryType.Success);
               OnAgentStatusChange("Plugin Complete");

6. Ensure that the class name remains as CustomPlugin this is required by the system.

7. Modify the display name of the custom plugin from "Custom Plugin" as required.

8. Enter any custom code you wish to execute in the Execute() method - other methods and classes can be created if required.

9. Set the project build to Release and build the project

10. Open the Release folder and copy the created .dll file (and optionally the .pdb file for additional debug information).

Do not copy the other reference files, these will be available automatically in the XIA Automation Server's bin directory.

11. Copy the files from the previous step to the XIA Automation Server installation directory's plugins folder (by default C:\Program Files\CENTREL Solutions\XIA Automation Server\Server\app_data\plugins).