GetNextRevisionCode 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 returns the next revision values for a document based on a revision scheme, starting major revision value, and starting minor revision value using the following criteria:

  • If the minor value is empty but not the major, returns only the next major value.

  • If the major value is empty but not the minor, returns only the next minor value.

  • If both major value and minor value are empty, returns the first revision values for both major and minor.

  • If both major value and minor value are not empty, returns the next combined code, incrementing the major value only if the revision scheme has run out of minor revision values for the starting major value.

Optionally, the method returns information about the next revision code in r_eriRevisionInformation from SchemaCompInterfaces.eRevisionInformation as follows:

  • NoComment = 0 - No extra information available about the next revision code.

  • Error = 1 - An error occurred.

  • NoFirstMajor = 2 - SmartPlant Foundation did not return a first major value for the revision scheme.

  • NoFirstMinor = 4 - SmartPlant Foundation did not return a first minor value for the revision scheme.  This could occur if the revision scheme lacks minor revisions.

  • NoNextMajor = 8 - SmartPlant Foundation did not return a next major value for the revision scheme.  This could occur if the revision scheme has run out of major revisions.

  • NoNextMinor = 16 - SmartPlant Foundation did not return a next minor value for the revision scheme.  This could occur if the revision scheme has run out of minor revisions.

GetNextRevisionCode adds together applicable values from eRevisionInformation to create the value in r_eriRevisionInformation, but the values are distinguishable by regarding them as bit flags.

SmartPlant Test Tool's SmartPlant > Next Revision Code command allows the user to try GetNextRevisionCode.

Signature

GetNextRevisionCode( _
ByVal p_sRevisionSchemeName As String, _
ByVal p_sStartingMajorRevision As String, _
ByVal p_sStartingMinorRevision As String, _
ByRef r_sNextMajorRevision As String, _
ByRef r_sNextMinorRevision As String, _
Optional ByRef r_eriRevisionInformation As SchemaCompInterfaces.eRevisionInformation _
) As Long

Arguments

Name

Data type

Input/output

Description

p_sRevisionSchemeName

String

Input

Name of revision scheme.

p_sStartingMajorRevision

String

Input

Major revision value to get next

p_sStartingMinorRevision

String

Input

Minor revision value to get next

r_sNextMajorRevision

String

Output

Next major revision value.

r_sNextMinorRevision

String

Output

Next minor revision value.

r_eriRevisionInformation

SchemaCompInterfaces.eRevisionInformation

Optional Output

Information about results, for example, that a returned value is empty.

Return Value

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