GetDocumentRevisionPublishability Method - 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 allows a publishing tool to determine whether a revision is publishable for a particular document.  A tool submits the document UID and proposed revision values to GetDocumentRevisionPublishability and receives back information on whether that revision of the document is publishable. If the proposed revision is not publishable for the input document UID (for example, because the revision was signed off), the tool could pass the offending revision values to GetNextRevisionCode and receive back new revision values to be tested.  The tool would continue until it received a publishable revision code for the document.

The method returns additional information about the publishability in r_erpRevisionPublishability from SchemaCompInterfaces.eRevisionPublishability as follows:

  • NotSet = 0 - Only returned if GetDocumentRevisionPublishability had an error.  Used internally.

  • New = 1 - Proposed revision does not already exist, is publishable, and requires the tool to reserve/create a new revision.

  • PublishableNotNew = 2 - Proposed revision already exists and is publishable, and the tool should not reserve/create a new revision.

  • Frozen = 3 - Proposed revision is not publishable because it is signed off or superseded.

  • InWorkflow = 4 - Proposed revision is not publishable because it is in a workflow.

  • OutOfOrder = 5 - Proposed revision is valid in the revision scheme of an existing revision and precedes the existing revision in that revision scheme.  Proposed revision is not publishable if any such old revisions' schemes are the same as the proposed revision's scheme.  Otherwise, it is publishable.  If publishable, the proposed out-of-order revision values will be new; if they are for an old revision (no matter the revision scheme) that was published, they are not publishable.  A publishing tool's designer might choose to prevent the creation of an out-of-order revision that is publishable.

SmartPlant Test Tool's SmartPlant > Document Revision Publishability command allows the user to try GetDocumentRevisionPublishability.

Signature

GetDocumentRevisionPublishability( _

ByVal p_sDocumentUID As String, _

ByVal p_sRevisionSchemeName As String, _

ByVal p_sMajorRevision As String, _

ByVal p_sMinorRevision As String, _

ByRef r_bPublishable As Boolean, _

ByRef r_erpRevisionPublishability As SchemaCompInterfaces.eRevisionPublishability _

) As Long

Arguments

Name

Data type

Input/output

Description

p_sDocumentUID 

String

Input

UID of document.

p_sRevisionSchemeName

String

Input

Name of revision scheme for proposed revision.

p_sMajorRevision

String

Input

Proposed major revision value.

p_sMinorRevision

String

Input

Proposed minor revision value.

r_bPublishable

Boolean

Output

Whether proposed revision is publishable.

r_erpRevisionPublishability

SchemaCompInterfaces.eRevisionPublishability

Output

Status of document revision publishabilty in SmartPlant Foundation:  New, PublishableNotNew, Frozen, InWorkflow, OutOfOrder, or NotSet.

Return Value

0 on success; a negative number otherwise.  Check the LastErrorMessage property on error.