|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > Selection > SelectByUniqueId |
Activate the Documents Page and selects the document with the unique id assigned.
call DBWShell("SelectByUniqueId UniqueID")
UniqueID |
unique id of the document |
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.
AndSelectByUniqueId command
SelectTreeByUniqueId command
SelectQueryByUniqueId command
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