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

Description

This method is called from the Publish dialog box by the SPCLCommonUI component when the user wants to select documents in the tool.

Document selection for SPCLCommonUI is shown in the context of the specified site, plant, and project. In the case of Smart Instrumentation, the site is domain. The user selects documents to publish, and for each selected document, the system will:

  • Create an instance for the document object in the oDocIContainer container

  • Get the IObject and IDocument interfaces

  • Populate the properties on IObject and IDocument

  • Get the IIssueRecordComposition and IDocVersionComposition interfaces

  • Tools must be careful not to add an existing document object in a container. It is possible that the container has documents before this method is called.

  • The default hierarchy for documents in the tree on the SPCLCommonUI Publish dialog box is Category > Type > Document. To make documents appear in a custom hierarchy, add objects and relationships to oDocIContainer.

Tools implement this method to do the following:

  • Create an instance of PublishDocumentFolder for each custom folder. The IObject.Name property appears next to the folder’s icon in the Publish dialog box tree.

  • To make a folder appear 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 use when the folder is not selected. It also populates the PublishDocumentFolder_SelectedIconPath property with the full path to the icon to use 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.

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.

sSPFProjectName

String (maximum 256 characters)

Input

Name of the SmartPlant Foundation project.

This argument is a placeholder for future enhancements. Tools can ignore this argument.

sToolProjectName

String (maximum 256 characters)

Input

Name of the tool project.

oDocIContainer

IContainer

Input/Output

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

Return Value

None.

Comments

If the method fails, the tool raises an appropriate exception.