GetDocumentListContainerForPublish 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 when a user clicks Publish on the design tool menu to initiate publish operations. The IContainer pointer returned by this method should be used by design tools to identify the documents for publish. The following steps take place in this method:

  • Creates a container composition for GenericDocument component schema

  • Creates a container for schema objects

  • Loads the GenericDocument component schema.

  • Creates a container composition for document.

  • Creates document containers (Metadata, Documents)

  • Checks if any documents have been published previously for the document UIDs (oDocUIDs ) passed by the tool.

  • Fills the documents container with document objects from the results the previous step.

  • Fills the new documents container with new document objects that have not been published before.

  • Fills the metadata container with DocumentVersion objects for each document object in documents container. If a document can be published to multiple revisions, there will be more than one DocumentVersion object for a document for user selection.

  • Fills the metadata container with a Workflow list for user selection.

  • Fills the metadata container with a Revision Schemes list for user selection.

  • Creates another set of document containers (Metadata, Documents) to be used by the tool to populate with user selected document objects and version objects.

The first time a document with a particular SmartPlant Foundation UID is published, GetDocumentListContainerForPublish returns one VersionedDoc object for that document in the oMetaIContainer for GetDocumentListContainerForPublish. The tool must set the revision scheme and revision code for the document before copying the VersionedDoc object into the oSelectedMetaIContainer for GetDocumentListContainerForPublish.

For each subsequent publish of a document with a particular SmartPlant Foundation UID, GetDocumentListContainerForPublish may return two VersionedDoc objects for that document in the oMetaIContainer for GetDocumentListContainerForPublish. One VersionedDoc object will contain the same revision number as the previous publish of the document, and will have a version number that is incremented from the previous publish. The other VersionedDoc will contain an incremented revision number and the first version number in that revision.

The tool chooses which VersionedDoc object to put in the oSelectedMetaIContainer for GetDocumentListContainerForPublish. This choice determines the revision and version of the document to be published.

The state of a document in SmartPlant Foundation may be such that SmartPlant Foundation will not allow a publish of a document with the same SmartPlant Foundation UID unless the revision of the document to be published is incremented. If this circumstance applies to the document being published, the oMetaIContainer will contain only a single VersionedDoc object. This object will contain an incremented revision number and the first version number in that revision.

Arguments

Name

Data Type

Input/Output

Description

oDocUIDs

IEFDocUIDs

Input

List of doc UIDs generated by the tool for the documents that have been selected by the user in the tool UI.

oDocIContainer

IContainer

Output

IContainer pointer to documents container with document objects previously published for given document UIDs in the oDocUIDs argument.

oNewDocIContainer

IContainer

Output

IContainer pointer to documents container with new document objects that have not been published previously for given document UIDs in the oDocUIDs argument.

oMetaIContainer

IContainer

Output

IContainer pointer to document version objects for given document UIDs in the oDocUIDs argument.

oSelectedDocIContainer

IContainer

Output

Empty IContainer for the design tool to fill with document objects and pass in the Publish method.

oSelectedMetaIContainer

IContainer

Output

Empty IContainer for the design tool to fill with document version objects and pass in the Publish method.

Return Value

0 if method is successful.

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

Comments

The only methods that can be called after GetDocumentListContainerForPublish are Publish or ReleasePublishDocumentListContainer on this interface. If any other method is called, it will fail with an appropriate error message.