RegisterToiHub as Long - HxGN SDx - Update 64 - Customization & Programming - Hexagon

HxGN SDx Programming Guide

ft:locale
en-US
Product
HxGN SDx
Search by Category
Customization & Programming

Registration or re-registration of an authoring tool with a plant is completed using the RegisterToiHub method. Before registration, the authoring tool must be authenticated using an Authentication server. More than one signature is available. Use the one with pblnIsForHandover, reSDxSiteType, rstrSDxProjectName, rstrSDxProjectUID, and robjSDxWorkPackage.

Arguments

Name

Data type

Input/output

Description

sToolID

String (maximum 24 characters)

Input

Design tool name.

For example, Smart 3D.

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.

oToolParameters

ISPToolParameters

Input

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

pblnIsForHandover

Boolean

Input

Indicates whether the registration is for handover (Standard Smart 3D model) or not (Change Management Smart 3D model).

reSDxSiteType

eSDxSiteType

Output

Indicates the type of server site: PAB (on-premises SDx) or Clipper (Cloud SDx2).

sSDxAuthPKCEClientID

String

Input/Output
Output for registration; Input for re-registration

Identifies the Client ID for the proof key code exchange (PKCE) authentication and redirects the tool to the applicable authentication server.

sSDxAuthPKCEClientSecret

String

Input/Output
Output for registration; Input for re-registration

Identifies the Client Secret for the PKCE authentication, allows it to access Smart API, and redirects the tool to the applicable authentication server.

sSDxAuthPKCERedirectURI

String

Input/Output
Output for registration; Input for re-registration

PKCE redirection URI.

sSDxAuthPKCEScope

String

Input/Output
Output for registration; Input for re-registration

Determines the level of access needed by a user.

sSDxAuthPKCEAdditionalParameters

Dictionary (of string, string)

Input/Output
Output for registration; Input for re-registration

Selects the token audience for PKCE authentication.

sSDxAuthCCIDClientID

String

Input/Output
Output for registration; Input for re-registration

Identifies the Client ID for the Client Credentials authentication and redirects the tool to the register page.

sSDxAuthCCIDClientSecret

String

Input/Output
Output for registration; Input for re-registration

Identifies the Client Secret for the Client Credentials authentication, allows it to access Smart API, and redirects the tool to the register page.

sSDxAuthCCIDScope

String

Input/Output
Output for registration; Input for re-registration

Determines the level of access needed by a user for Client Credentials.

oSDxAuthCCIDAdditionalParameters

Dictionary (of string, string)

Input/Output
Output for registration; Input for re-registration

Selects the token audience for Client Credentials

sSPFURL

String (maximum 128 characters)

Input/Output
Output for registration; Input for re-registration

SDx URL entered in the Register dialog box. This should be saved in the tool database.

sSPFPlantName

String

Input/Output
Output for registration; Input for re-registration

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

sSPFPlantUID

String

Output

SDx plant UID for sSPFPlantName.

rstrSDxProjectName

String

Input/Output
Output for registration; Input for re-registration

SDx project name for the selected Work Area Definition, if any.

rstrSDxProjectUID

String

Output

SDx project UID for the selected Work Area Definition, if any.

robjSDxWorkPackage

IContainer

Output

If the tool registered to an SDx server site (Cloud), this is an IContainer object with data for the Work Package objects associated with the Work Area selected during registration. If the tool registered to an SDx PAB server site (on-premises), this is null.

sSignature

String (4 characters)

Input/Output
Output for registration; Input for re-registration

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

sIntegrationMode

IntegrationModes

Output

Indicates if the tool will integrate with SmartPlant Foundation or SDx.

sAMQPBrokerHostName

String

Output

Tools must subscribe to the Advanced Message Queuing Protocol (AMQP) server to get messages from SDx. The details required to subscribe to the AMQP server from the tool are: AMQP server broker host name, AMQP server broker protocol, AMQP server broker port, and AMQP server extensibility topic. This argument is used to subscribe to the AMQP broker host name.

sAMQPBrokerProtocol

String

Output

Subscribes to the AMQP server Broker Protocol.

sAMQPBrokerPort

String

Output

Subscribes to the AMQP server Broker Port.

sAMQPBrokerExtensibilityTopic

String

Output

Subscribes to the AMQP server for the specific Extensibility Topic.

sAMQPBrokerExtensibilityTopic

String

Output

Subscribes to the AMQP server for the specific extensibility topic.

sSDxWebClientURL

String

Output

SDx URL provided in the Register dialog box. This should be saved in the tool database.

Processing Narrative of the Register Method

This method returns the following values:

  • Client ID and Client Secret for SDx Authentication, using PKCE

  • Redirect URI for SSDx Dx Authentication, using PKCE

  • Scope of SDx Authentication, using PKCE

  • Additional Parameters of SDx Authentication, using PKCE

  • Client ID and Client Secret for SDx Authentication, using Client Credentials

  • Scope of SDx Authentication, using Client Credentials

  • Additional Parameters of SDx Authentication, using Client Credentials

  • SDx URL

  • SDx plant and plant UID

  • SDx project name and UID for the selected Work Area Definition, if any

  • Tool signature

  • Integration Mode

  • AMQP Broker Host Name, AMQP Broker Protocol, AMQP Broker Port, and AMQP Broker Extensibility Topic

  • SDx URL

The tool must store the SDx URL, SDx plant, and tool signature, and pass the URL and plant in the Connect method call.

Return Value

  • 0 - Successful

  • 1 - User canceled the operation.

  • Negative number - Method fails (check the LastErrorMessage property for error message).

Comments

The tool calls this method to register with a SDx database. If the method is successful, the following arguments are set:

  • sSDxAuthPKCEClientID

  • sSDxAuthPKCEClientSecret

  • sSDxAuthPKCERedirectURI

  • SSDxAuthPKCEScope

  • oSDxAuthPKCEAdditionalParameters

  • sSDxAuthCCIDClientID

  • sSDxAuthCCIDClientSecret

  • sSDxAuthCCIDScope

  • oSDxAuthCCIDAdditionalParameters

  • sSPFURL

  • sSPFPlantName

  • sSPFPlantUID

  • rstrSDxProjectName - if there was a selected Work Area Definition

  • rstrSDxProjectUID - if there was a selected Work Area Definition

  • sSignature

  • sIntegrationMode

  • sAMQPBrokerHostName

  • sAMQPBrokerProtocol

  • sAMQPBrokerPort

  • sAMQPBrokerExtensibilityTopic

  • sSDxWebClientURL

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.