Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

The IAddin Interface

  • Last UpdatedNov 10, 2025
  • 2 minute read

What distinguishes an addin from any other .NET assembly is that an addin must contain a class which implements the IAddin interface. When the CAF loads and starts an addin it interrogates the assembly for the class which implements this interface, creates an instance of this class and calls the IAddin.Start method.

The following code is a simple example of a class which implements the IAddin interface.

This is the AttributeBrowserAddin.cs file which is part of the AttributeBrowserAddin sample project which can be found in the samples directory. The Start method performs the initialization of the Addin.

using System;

using System.Collections.Generic;

using System.Text;

// Add additional using statements

using Aveva.ApplicationFramework;

using Aveva.ApplicationFramework.Presentation;

namespace Aveva.Presentation.AttributeBrowserAddin

{

public class AttributeBrowserAddin : IAddin

{

#region IAddin Members

public string Description

{

get

{

return "Provides a simple attribute browser";

}

}

public string Name

{

get

{

return "AttributeBrowserAddin";

}

}

public void Start(ServiceManager serviceManager)

{

// Create Addins Windows

// Get the WindowManager service

WindowManager windowManager = (WindowManager)serviceManager.Get\-Service(typeof(WindowManager));

// Create a docked window to host an AttributeListControl

DockedWindow attributeListWindow = windowManager.CreateDocked\-Window("Aveva.AttributeBrowser.AttributeList",
"Attributes", new Attrib\-uteListControl(), DockedPosition.Right);

// Docked windows created at addin start should ensure their lay\-out is saved between sessions.

attributeListWindow.SaveLayout = true;

// Create and register addins commands

// Get the CommandManager

CommandManager commandManager = (CommandManager)serviceMan\-ager.GetService(typeof(CommandManager));

ShowAttributeBrowserCommand showCommand = new ShowAttributeBro\-wserCommand(attributeListWindow);

commandManager.Commands.Add(showCommand);

}

public void Stop()

{

}

#endregion

}

}

TitleResults for “How to create a CRG?”Also Available in