There will be a Register command in the design tool menu to register a tool’s plant with an SmartPlant Foundation plant. This method should be called once per plant when a user clicks Register.
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. |
sToolEFAdapterProgID |
String |
Input |
ProgID of EFAdapter (tool implementation object that supports IEFAdapter) |
oToolParameters |
IEFToolParameters |
Input |
Collection of tool parameters that in turn will be passed to the tool adapter. Arguments tool Site, tool Plant, and tool workgroup file of the IApplication.Register method, as well as any other tool specific parameters, can be passed using this argument. |
sSPFURL |
String (maximum 128 characters) |
Input |
SmartPlant Foundation URL used in the GetSPFPlants method called earlier. |
sSPFPlant |
String (maximum 254 characters) |
Input |
One of the SmartPlant Foundation plants returned in GetSPFPlants method called earlier. |
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 failed. (Check the LastErrorMessage property to get the 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 NULL.
This method should be called for every integrated plant.