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

SmartPlant Integration COM 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)

There will be a Register command in the design tool’s menu to register a tool’s plant with an SmartPlant Foundation plant. This method should be called once per plant when user clicks the Register command.

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 the 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)

Output

SmartPlant Foundation URL entered by user in the first dialog, to be saved in the tool database.

sSPFPlant

String (maximum 254 characters)

Output

SmartPlant Foundation plant selected by user in the second dialog, 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, the following message will be displayed with the SmartPlant Foundation URL and SmartPlant Foundation plant with which the tool plant is registered. Re-registration of a tool plant is not allowed.

If the tool plant is not registered, the first dialog box is displayed as shown below.

The user enters a valid SmartPlant Foundation URL and clicks Next.

The method queries the SmartPlant Foundation database for the list of plants.

The second dialog box is displayed as shown below. If there is a SmartPlant Foundation plant name matching the tool plant name, it is displayed as selected in the plant combo box.

The user selects the SmartPlant Foundation plant name and clicks Next.

The auto-retrieve setup dialog box is displayed. This dialog is displayed only if the tool supports the auto-retrieve feature. (EFCommonUI will call the SupportsFeature method on EFAdapter to know if the tool supports the auto-retrieve feature. See the SmartPlant Adapter Interfaces Reference Guide for details.) This dialog box allows users to enable or disable auto-retrieve for the plant that is being registered.

Auto-retrieval is not currently supported.

The method calls the EFClient’s RegisterSource method to store tool information in SmartPlant Foundation and to get a signature.

The method returns the SmartPlant Foundation URL, SmartPlant Foundation plant, and the signature.

When this method returns, tools must store the SmartPlant Foundation URL, SmartPlant Foundation plant, and the signature for that tool plant. The tool must pass the SmartPlant Foundation URL and SmartPlant Foundation plant in the Connect method call.

Return Value

0 – Successful

1 – User cancelled the operation

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 sSPFURL, sSPFPlant, and sSignature arguments will be set. The tool needs to store these values in its database. If the method fails, it will set the LastErrorMessage property with an error message and return a negative number, and sSPFURL, sSPFPlant, and sSignature will be set to NULL.

This method should be called for every integrated plant.