Software
Customisation User Guide
Common Application Framework Addins
Common Application Framework Addins
CAF addins provide the .NET programmer with access to .NET interfaces or other systems using the IAddin interface. Addins are loaded when the AVEVA module is launched. CAF addins can be used to subscribe to application events and load commands to the GUI.
Each CAF addin is listed as an xml addin configuration file which lists all of the addins that are loaded when the module is launched.
XML Addin Configuration File
The example displays an xml addin configuration file named in the format <module>Addins.xml.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<string>MyAddin</string>
</ArrayOfString>
The xml addin configuration file works with the CAF_ADDINS_PATH and CAF_UIC_PATH environment variables.
CAF_ADDINS_PATH
indicates the location of the addIns.
CAF_UIC_PATH
indicates the location of files where the GUI is defined.
The example displays the processes used to create and implement a CAF addin.
IAddin Interface File
The example displays an Iaddin interface file.
public class MyAddin : Aveva.ApplicationFramework.IAddin
{
public MyAddin()
{
}
void Aveva.ApplicationFramework.IAddin.Start(ServiceManager
serviceManager)
{
CommandManager cm =
serviceManager.GetService(typeof(CommandManager));
cm.Commands.Add(new MyCommand());
}
Detailed information about CAF addins is available, refer to
How to Write a CAF Addin
and
Environment Variables for .NET Customisation
for further information.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.