Create a Management Center Snap-In
- Last UpdatedApr 15, 2025
- 4 minute read
First, you will need to create the DLL for your snap-in:
- Create a new "Class Library" project within Microsoft Visual Studio.
- Add the following references to the project:
- IntelaTrac.Sdk
- SAT.Core
- Sat.Core.Desktop.UI
- Add a new WindowsForm to the project (this will be the base form displayed on your application) with the following "using statement:"
using IntelaTrac.Sdk;
- Change the form's inheritance from "Form" to "ImcSnapInFormBase"
- Add a new class called "NavigationItem" to the project.
- Add the following "using statement" to the new class:
using IntelaTrac.Sdk;
- Set "NavigationItem" to inherit from "ImcNavigationItem"
- Override the "OpenItem()" and "OpenItem(string title, System.Drawing.Icon icon)" items. Once overridden, the entry should typically resemble the following, where "form" is a static variable of the form inherited from ImcSnapInFormBase:
public override void OpenItem()
{
if (form != null)
{
form.Activate();
}
else
{
this.OpenItem(string.Empty, null);
}
}
public override void OpenItem(string title, System.Drawing.Icon icon)
{
if (form != null)
{
form.Activate();
}
else
{
form = new (your static form (SEE STEP 9))(title, icon);
form.Closed += new EventHandler(this.FormClosed);
//The call to ShowSnapIn() displays the form in the Management Center
form.ShowSnapIn();
}
}
-
The static form defined in Step 8 requires the following constructor, fields, and properties:
privatestring title;private System.Drawing.Icon displayIcon;
public (your static form)(string text, System.Drawing.Icon icon)
{
this.title = text;
this.displayIcon = icon;
InitializeComponent();
}
public string Title
{
get { return this.title; }
set { this.title = value; }
}
public System.Drawing.Icon FormIcon
{
get { return this.displayIcon; }
set { this.displayIcon = value; }
}
public static void Close(){
if (form != null)
{
form.Close();
}
}
void FormClosed(object sender, EventArgs e)
{
form = null;
}
-
Compile the DLL, and then copy it into the Management Center installation directory (by default: "\Program Files\AVEVA\Mobile Operator\Client").
Configuring the Management Center
You must next edit the Management Center's "sat.config" file to accept the new snap-in.
- Open the "sat.config" file, located in the Management Center installation directory (by default: "\Program Files\AVEVA\Mobile Operator\Client") in a text editor such as notepad.
- Find the "groups" section within sat.config (tagged with <Group> and </Group>).
- Copy and paste the following template into the sat.config file appropriately (properly creating a new "Group" entry):
<Group>
<ID>CustomSnapInGroupID</ID>
<Name>Custom Snap In</Name>
<ToolTip>Custom SnapIn</ToolTip>
<IconFile>Resources\world.ico</IconFile>
<IsVisible>True</IsVisible>
<Order>10</Order>
<Items>
<Items>
<Entry>
<Key>
<Value Type="System.String, mscorlib">HelloWorldID</Value>
</Key>
<Value>
<Value Type="SAT.Desktop.UI.Navigation.NavigationItem, SAT.Core.Desktop.UI">
<ID>HelloWorldID</ID>
<Name>Hello World</Name>
<ToolTip>Hello World example program</ToolTip>
<IconFile>Resources\world.ico</IconFile>
<Executable>Imc.SnapIn.Example.WinForm.dll</Executable>
<WorkingFolder>
</WorkingFolder>
<TypeName>Imc.SnapIn.Example.WinForm.NavigationItem, Imc.SnapIn.Example.WinForm</TypeName>
<Order>0</Order>
<DynamicScopeContext>1</DynamicScopeContext>
<InstanceContext>0</InstanceContext>
</Value>
</Value>
</Entry>
</Items>
</Items>
</Group>
- Edit the new Group section according to your needs, using the following explanation of variables as a guide.
- Save changes to the SAT.CONFIG file.
- IMPORTANT: Delete the Windows user's SAT.USER.CONFIG file. The location of this file differs by operating system. The following examples assume Windows installation to C: and use "LOGIN_NAME" to indicate the login name of the user:
- In Windows Vista and Windows 7: "C:\Users\LOGIN_NAME\AppData\Roaming\SAT\Data"
- In Windows XP: "C:\Documents and Settings\LOGIN_NAME\Application Data\SAT\Data"
Group Settings
ID: A user-assigned, unique ID for this Group (alphanumeric characters, no spaces).
Name: The name of the Group. This text will appear in the Navigation pane.
ToolTip: The text that appears when the mouse pointer hovers over the Group.
IconFile: The .ICO file used to represent the Group. (This path is relative to the Management Center's installation directory. As a "best practice," place icon files in the "Resources" directory like the template example.)
IsVisible: This flag controls whether or not the Group is displayed in the Management Center.
Order: An integer representing where this Group appears in the Management Center's Navigation Pane relative to other Groups. A Group with a value of 0 is placed at the top, a Group with a value of 1 just under it, and so forth. Note that all groups in the Management Center use an Order value; and avoid conflicts when assigning this number. (The Management Center ships with 8 groups by default.)
Snap-in Settings
Key - Value Type: A unique ID for the Snap-in (alphanumeric characters, no spaces). This must match the "Value - ID" setting described below.
Value - Value Type: Must be set to "SAT.Desktop.UI.Navigation.NavigationItem, SAT.Core.Desktop.UI"
Value - ID: A unique ID for the Snap-in (alphanumeric characters, no spaces). This must match the "Key - Value Type" setting described above.
Value - Name: The name of the Snap-in. This text will appear in the nagivation pane.
Value - ToolTip: The text that appears when the mouse pointer hovers over the Snap-in.
Value - IconFile: The .ICO file used to represent the Snap-in. (This path is relative to the IMC's installation directory. As a "best practice," place icon files in the "Resources" directory like the template example.)
Value - Executable: The full filename of the DLL used (excluding path).
Value - TypeName: This setting consists of two parameters separated by a comma. The first parameter specifies the DLL's namespace and class that inherited from ImcNavigationItem. The second parameter is the name of your assembly (without the ".DLL" extension).
Value - Order: An integer representing where this Snap-in appears within this Group relative to other Group entries.
Value - DynamicScopeContext: Must be set to 1
Value - InstanceContext: Must be set to 0