The Register method registers a tool's plant with a SmartPlant Foundation plant. This method should be called once per plant.
To register a tool's plant with a SmartPlant Foundation plant, you must use the signature that contains oToolSPAdapterAssemblyInformation or a combination of sToolSPAdapterAssemblyPath and sToolSPAdapterTypeName. The signatures are defined as below:
Arguments
Name |
Data type |
Input/output |
Description |
---|---|---|---|
sToolID |
String (maximum 24 characters) |
Input |
Design tool name. For example, Smart P&ID. |
sToolDescription |
String |
Input |
Unique description of the tool instance that is being registered. |
oToolSPAdapterAssemblyInformation |
String |
Input |
For SmartPlant adapter, this contains adapter assembly information and an associated AppDomain information, if any. |
sToolSPAdapterAssemblyPath |
String |
Input |
Absolute path to SPAdapter assemby. |
sToolSPAdapterTypeName |
String |
Input |
SPAdapter type name. |
oToolParameters |
String |
Input |
Collection of tool parameters that in turn will be passed to the tool adapter. Arguments such as Tool Site, Tool Plant, of the ISPClientApplicationUI.Register method, as well as any other tool specific parameters, can be passed using this argument. |
sSPFURL |
String (maximum 128 characters) |
Output |
SmartPlant Foundation URL entered by the user in the Register dialog box, to be saved in the tool database. |
sSPFPlant |
String (maximum 254 characters) |
Output |
SmartPlant Foundation plant selected by user in the Register dialog box, to be saved in the tool database. |
sSPFUserID |
String |
Input |
SmartPlant Foundation login user ID |
sSPFUserPwd |
String |
Input |
SmartPlant Foundation login user password. |
sSignature |
String (maximum 4 characters) |
Output |
4-character unique value returned by SmartPlant Foundation to be saved in the tool database. |
When this method returns, tools must store the SmartPlant Foundation URL, SmartPlant Foundation Plant, and the signature for that tool plant. Tool must pass the SmartPlant Foundation URL and SmartPlant Foundation plant in the Connect method call.
Return Value
-
0 - Successful.
-
Negative number - Method fails (check the LastErrorMessage property for error message).
Comments
The tool will call this method to register its database with a SmartPlant Foundation database. If the method is successful, the sSignature argument will be set. The tool needs to store the signature in its database. If the method fails, it will set the LastErrorMessage property with the error message and return a negative number, and sSignature will be empty.
This method should be called for every integrated plant.
SPCLCommonUIApplicationNoUI currently does not support registering more than once per instance of SPCLCommonUIApplicationNoUI class.