Using the Process Analyst > Process Analyst for Developers > Automation Model > ICommandSystem.Create [Method]

ICommandSystem.Create [Method]

Creates a new Command object that is added to the CommandSystem.

Defined As



[in] A unique identifier for this command (1-64 characters).


[in] A value representing a button type.


[in] The text to be displayed as a tooltip for this command (1-64 characters).


[in] The path to an icon file that will be used as this command's picture.


[in] A privilege value necessary by the CitectSCADA user to gain access to this command (0-8).

Execution Result

If the method succeeds, the return value is Success. If an argument is invalid or out of range, the return value is InvalidArgument. If the command was not created, the return value is GeneralFailure.


The commandID cannot begin with the prefix "Citect_".

Calling Syntax

This example assumes there is a valid CommandSystem object as retrieved from a Process Analyst. (for example, VBA: ProcessAnalyst.CommandSystem).


Sub Example(CommandSystem As Object)
Dim command As Object
Set command = CommandSystem.Create(CommandIO, "Some tooltip text", "c:\someicon.ico", 5)
End Sub


FUNCTION Example(OBJECT hCommandSystem)
OBJECT hCommand = _ObjectCallMethod(hCommandSystem, "Create", CommandIO, "Some tooltip text", "c:\someicon.ico", 5);