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

The EFCommonUI supports registering to a project for tools that do not have configuration management (AsBuilt/Projects). Such tools can register to a plant or a project within a plant. Registration to a project is supported for tools that return TRUE for NoConfigurationManagement in the SupportsFeature method of the EFAdapter. The RegisterToProject command in the IEFCommonUIApplication interface will display a dialog box with a list of active projects for user to pick. All currently integrated tools support configuration management and must return FALSE for NoConfigurationManagement in the SupportsFeature method of the EFAdapter.

The RegisterToProject method will have two new arguments, sProjectUID and sProjectName, which are returned with valid values for project UID and project name when a user registers with a project in a plant. The values of these arguments will be null if the registration is done to a plant (no project registration).

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 box, to be saved in the tool database.

sSPFPlant

String (maximum 254 characters)

Output

SmartPlant Foundation plant selected by user in the second 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.

sSPFProjectUID

String (maximum 128 characters)

Output

UID of the project selected in the Register dialog box. NULL if registered to a plant.

sSPFProjectName

String (maximum 256 characters)

Output

Name of the project selected in the Register dialog box. NULL if registered to a plant.

oPBSIContainer

IContainer

Output

Optional. Container containing PBS items. Upon successful registration, if a PBS document exists in SmartPlant Foundation, it will be loaded into a container and will be returned for tools to retrieve it. If there is no PBS document for the registered SmartPlant Foundation plant, the return value is nothing.

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, sSPFProjectUID, sSPFProjectName, 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 and error message and return a negative number, and sSPFURL, sSPFPlant, sSPFProjectUID, sSPFProjectName, and sSignature will be NULL.