ShowPublishDialog As Long - 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)

This method should be called in conjunction with GetDocumentListContainerForPublish. Before calling this method, the design tool would identify the selected documents by adding them to IContainer returned by the GetDocumentListContainerForPublish method. When called, the ShowPublishDialog method would display the Publish window with the list of documents in the tree view control passed in the IContainer object. When the user clicks OK in the Publish dialog box, business logic code will call ISPAdapter to generate XML for each document.

The ShowPublishDialog method completes the transaction started by the GetDocumentListContainerForPublish method if the method is successful. The following steps take place in the ShowPublishDialog method.

The Publish dialog box is displayed.

After the user makes selections in the Publish dialog box:

  • ServiceManager calls ISPAdapter to generate document XML for each document.

  • ServiceManager calls the SPCLClient publish method for each document, unless you select Scheduled Publish in the Publish dialog box. If you select Scheduled Publish, ServiceManager sends your selections to the tool adapter using the ISPAdapter4 interface instead of continuing with the normal publish process.

ServiceManager later calls ISPAdapter to let SPAdapter know each document published successfully.

The default hierarchy for documents in the tree on the SPCLCommonUIApplicationUIā€™s Publish dialog box is Category > Type > Document. To make documents appear 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 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 and the PublishDocumentFolder_SelectedIconPath property with the full path to the icon to use when the folder is selected. Both properties may use the same icon.

  • To make one folder be 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

Show Publish dialog

Arguments

Name

Data type

Input/output

Description

oDocIContainer

IContainer

Input

IContainer reference to documents container.

Return Value

  • 0 if method is successful.

  • 1 if user cancels the operation in Publish dialog.

  • A negative number if method fails. (Check the LastErrorMessage property for error message)

Comments

The design tool should release all local pointers to IContainer passed in the ShowPublishDialog method after the method is called successfully.