DBWGetNumberOfRevisions

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > Revision >

DBWGetNumberOfRevisions

Description

Retrieves the number of revision for a document.

Syntax

Function DBWGetNumberOfRevisions(uid)

Parameters

uid

the unique id of the document to count revisions of.

Return Values

The function assumes the value of the number of revisions found.
If the document is in state of NEW, a vlaue of "0" (zero) is returned.

Example

sub main()
 dbwinit(TRUE)
 DBWShell("CurrentDocument")
 uid = DBWResult("@DOCUMENT_UNIQUE_ID")
 DBWMsgBox "The selected document has " & DBWGetNumberOfRevisions(uid) & " revisions"
end sub