SelectByUniqueId

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > Selection >

SelectByUniqueId

Description

Activate the Documents Page and selects the document with the unique id assigned.

Syntax

call DBWShell("SelectByUniqueId UniqueID")

Parameters

UniqueID

unique id of the document

Remarks

The Unique Id of a document is an unambiguous integer that identifies it. No document can have the same Unique Id of another one.

Mechworks PDM browser must be open.

In case the RMB option Show Current's Project Documents Only is active and the passed uid document is not belonging to the current project, an error will be raised.

See also

AndSelectByUniqueId command
 
SelectTreeByUniqueId command
SelectQueryByUniqueId command

Example

Sub main()

 DBWInit(TRUE)
 call DBWShell( "OpenForBrowsing" )
 call DBWShell( "SelectByUniqueId 34" )
 if okDBW=FALSE then
  DBWMsgBox "Object not found"
 end if
 call DBWShell( "CurrentDocument" )
 uid = DBWResult("@DOCUMENT_UNIQUE_ID")
 fileName = DBWQueryByUid( uid, "FILE_NAME")
 DBWMsgBox "File name=" & fileName
end sub