Register As Long - Integration - Update 46 - Help - Hexagon

SmartPlant Integration .NET Help

Language
English
Product
Integration
Search by Category
Help
SmartPlant Foundation / SDx Version
10
Smart P&ID Version
9 (2019)
Smart Engineering Manager Version
10 (2019)

This method is used to register a tool’s plant with a SmartPlant Foundation plant, and must 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

ISPAssemblyInformation

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

ISPToolParameters

Input

Collection of tool parameters that in turn are passed to the tool adapter. Arguments, such as Tool Site, Tool Plant, as well as any other tool specific parameters, can be passed using this argument.

sSPFURL

String (maximum 128 characters)

Output

SmartPlant Foundation URL entered in the Register dialog box, to be saved in the tool database.

sSPFPlant

String (maximum 254 characters)

Output

SmartPlant Foundation plant selected in the Register dialog box, to be saved in the tool database.

sSignature

String (maximum 4 characters)

Output

4-character unique value returned by SmartPlant Foundation to be saved in the tool database.

Processing Narrative of the Register method

If the current tool plant is already registered with the SmartPlant Foundation URL and the SmartPlant Foundation plant, then re-registering it returns the same signature that was returned during the last registration.

When you click Register, the Register dialog box is displayed.

  1. Type a valid SmartPlant Foundation URL in the URL box.

  2. Validate the URL by clicking Validate.

  3. Type a valid Username and Password have to be entered to fetch the list of plants for the entered site in the SmartPlant Foundation database.

  4. When you click GetPlants, the SmartPlant Foundation server identified by the URL is queried for a list of its plants, which is then displayed.

  5. Click OK. At this point, SPCLClient’s RegisterSource method is called to store tool information in SmartPlant Foundation and to get a signature.

This method returns the SmartPlant Foundation URL, SmartPlant Foundation plant and tool signature. The tool must store the SmartPlant Foundation URL, SmartPlant Foundation plant and signature. The tool must pass the URL and plant in the Connect method call.

Return Value

  • 0 – Successful.

  • 1 – User canceled the operation.

  • Negative number – If method fails (check the LastErrorMessage property for error message).

Comments

The tool calls this method to register with a SmartPlant Foundation database. If the method is successful, the sSPFURL, sSPFPlant, and sSignature arguments are set. The tool needs to store these values in its database. If the method fails, it sets the LastErrorMessage property with an error message and returns a negative number. The sSPFURL, sSPFPlant, and sSignature arguments are empty.

This method must be called for every integrated plant.

SPCLCommonUIApplicationUI currently does not support registering more than once per instance of SPCLCommonUIApplicationUI class.

Processing Narrative of the Multi-Instance Register method

SmartPlant Foundation supports multi-tool to single SmartPlant plant registration. When a tool plant wants to register multiple tool plants to a single SmartPlant Foundation plant, multi-instance (plant) registration must be enabled by the tool's SmartPlant Adapter's SupportsFeature method returning True for MultiToolPlantsToOneSPFPlant.

Intergraph Smart 3D® currently supports multi-tool plant registration.

If the tool supports multi-instance registration:

  • Re-registering a tool plant to SmartPlant Foundation with same name and description returns the same signature.

  • Re-registering a tool plant to SmartPlant Foundation with same name and different description returns a different signature.

When the user clicks on Register, the Register dialog box is displayed.

  1. Type a valid SmartPlant Foundation URL in the URL box.

  2. Validate the URL by clicking Validate.

  3. Type a valid Username and Password to fetch the list of plants for the entered site in the SmartPlant Foundation database.

  4. To query the list of plants, click GetPlants. The list of SmartPlant Foundation plants is displayed.

  5. Select a SmartPlant Foundation plant to re-register. The Tool Plant Description list displays the previously registered descriptions.

  6. You can select an already existing description or enter a new description in the same list.

  7. Click OK. At this point, SPCLClient’s RegisterSource method is called to store tool information in SmartPlant Foundation and to get a signature, depending on the description.

This method returns the SmartPlant Foundation URL, SmartPlant Foundation plant, and tool signature. The tool must store the SmartPlant Foundation URL, SmartPlant Foundation plant, and signature.

Return Value

  • 0 - Successful.

  • 1 – User canceled the operation.

  • Negative number - If method fails (Check the LastErrorMessage property for error message).