Methods (ISPToolDocs) - 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)

GetUserSelections

This method is called in the Publish dialog box by the ISPCLCommonUI component when you select documents in the tool. Tools implement this method to do the following:

  • Show ISPCLCommonUI document selection in context of the specified site and plant. In the case of SmartPlant® Instrumentation, the site is Domain.

  • Perform the following actions for each document the user selects for publishing:

    • Creates an instance for the document object in the oDocIContainer container.

    • Gets the IObject and IDocument interfaces.

    • Populates the IObject and IDocument properties.

    • Gets the IIssueRecordComposition and IDocVersionComposition interfaces.

    • Tools should not add an existing document object to a container, because the container may already have documents before this method is called.

    • The default hierarchy of the ISPCLCommonUIApplicationUI’s Publish dialog box document tree is Category > Type > Document. To display documents in a custom hierarchy, add objects and relationships to oDocIContainer.

For each custom folder, create an instance of PublishDocumentFolder. Property IObject.Name will appear next to the folder’s icon in the Publish dialog box tree.

To display a folder with a custom icon, get the IPublishDocumentFolder interface of the folder object and populate the PublishDocumentFolder_NormalIconPath property with the full path to the icon to be used when the folder is not selected, and the PublishDocumentFolder_SelectedIconPath property with the full path to the icon to be used when the folder is selected. Both properties can use the same icon.

To make one folder the parent of another, create a DocumentFolderCollection relationship where the child is end 1 and the parent is end 2.

To make a document appear in a folder, create a DocumentsInFolders relationship where the document object is end 1 and the folder object is end 2.

ISPToolDocs_Method

Arguments

Name

Data type

Input/output

Description

sSPFURL

String (maximum 128 characters)

Input

SmartPlant Foundation URL to which the tool is currently connected.

sSPFPlant

String (maximum 256 characters)

Input

Name of the SmartPlant Foundation plant to which the tool is currently connected.

oDocIContainer

IContainer

Input/Output

Reference to Schema Component IContainer object in which the tool will add a document object for the document selected in the tool UI.

Return Value

None.

Comments

If the method fails, the tool will raise an appropriate exception.