Methods to Get Published Document Data - 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)

The design tool can use the following methods to get the published document data. These methods help in restoring the document as it was last published by the tool.

  1. CreateContainersForPublishedDocData method creates containers required in the GetPublishedDocData method.

  2. GetPublishedDocData method returns the document data as published by the design tool.

  3. ReleaseContainersForPublishedDocData method releases the containers created in the CreateContainersForPublishedDocData method.

These three methods must be called sequentially in the order specified.

GetPublishedDocData As Long

The SmartPlant Foundation database is queried for document data XML published by the tool, the oDocList container is loaded, and a version object is created in the oDocMeta container for the document. The version object has the revision, version and published date values. The oDocMeta container also has File objects; one for the view file and each reference file.

Arguments

Name

Data type

Input/output

Description

sDocUID

String

Input

UID of document.

oDocData

IContainer

Output

Reference to the IContainer that contains document data and relationships.

oDocMeta

IContainer

Output

Reference to the IContainer that contains document version and File objects.

oDocTombstones

IContainer

Output

Reference to the IContainer that contains tombstones published in the context of the document.

Return Value

  • 0 if method is successful.

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

ReleaseContainersForPublishedDocData As Long

This method releases the containers created in CreateContainersForPublishedDocData method. This method must be called after the GetPublishedDocData method is called and the data returned in GetPublishedDocData method is processed.

Arguments

None.

Return Value

  • 0 if method is successful.

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