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

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 wizard with the list of documents passed in the IContainer object. At the end of the Publish wizard, EFServiceManager will call EFAdapter 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,

  • EFServiceManager calls EFAdapter to generate document XML for each document.

  • EFServiceManager calls the EFClient publish method for each document, unless you selected Scheduled Publish in the Publish dialog box. If you selected Scheduled Publish, EFServiceManager send the selections to the tool adapter using the IEFAdapter5 interface instead of continuing with the normal publish process.

EFServiceManager calls EFAdapter to let EFAdapter know that the publish is successful for each document published successfully.

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

  1. 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.

  2. 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.

  3. 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.

  4. 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

oDocIContainer

IContainer

Input

IContainer pointer to the documents container.

Return Value

0 if method is successful.

1 if the 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.