Publish Functions - 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)

There will be a command in design tool menu for publish operations. A user may select one or more documents in the tool UI and click Publish command, or the user may choose to publish an active document that is being worked on. The publish functions should be called when the user clicks the Publish command in the design tool menu.

The publish function is handled as a transaction. There is a call to begin the publish operation (GetDocumentListContainerForPublish), a call to cancel the publish operation (ReleasePublishDocumentListContainer), and a call to proceed with the publish operation (Publish). The reason to have Publish in a transaction is for better management of Container Compositions and Containers, and to avoid any possible memory leaks.

A design tool should always use these functions similar to calls made for a database transaction. For every GetDocumentListContainerForPublish call, there should be a call made to ReleasePublishDocumentListContainer or Publish.

GetDocumentListContainerForPublish will create the necessary Container Compositions and Containers, and the pointer to the container object will be returned. The design tool will use the container to identify the documents selected by the users and call Publish.

The ReleasePublishDocumentListContainer call should be made after GetDocumentListContainerForPublish if an error occurs or if the operation is cancelled for some reason.

The project/plant context for the publish operation is the same as the context set in the Connect method. Before calling publish functions, the design tool must make sure that the context for publish is the same as the context set in the Connect method. If the publish context is different, the Connect method should be called again with the right context.