Publish 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 the oSelectedDocIContainer returned by the GetDocumentListContainerForPublish method. The design tool will add the version objects to the oSelectedMetaIContainer based on user selection. For documents that have not been published previously, the design tool will set the Workflow and RevisionScheme properties based on user selection.

When called, the Publish method will interface with ServiceManager, which will call ISPAdapter to generate XML for each document.

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

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

  • ServiceManager calls SPCLClient’s publish method for each document.

  • ServiceManager calls ISPAdapter to let ISPAdapter know that the publish is successful for each document published successfully.

  • If a document fails to publish, the path to a log file is returned. It is the tool’s responsibility to display the log to the end user

Arguments

Name

Data type

Input/output

Description

oSelectedDocIContainer

IContainer

Input

IContainer pointer to the documents container with the user selected document objects.

oSelectedMetaIContainer

IContainer

Input

IContainer pointer to the documents container with user selected document version objects of user selected documents.

sLogFile

String

Output

Path to a log file with Publish failure messages if there is a failure in publish.

Return Value

  • 0 if method is successful.

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

Comments

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