|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > UserInterface > OnDoubleClick.LST script file |
This script allows to customize the doubleclick action, that by default is performed as an opening of the selected document.
LST folder
Options→User Interface→Browser Behavior
@DOCUMENT_PATHNAME |
It's the complete path of the file (when available) corresponding to the doubleclicked record |
|---|---|
@DOCUMENT_UNIQUE_ID |
It's the unique_id of the file (except if in Attachments grid) corresponding to the doubleclicked record |
Please note the information provided are depending on the area you perform the doubleclick on. In the Tree only the @DOCUMENT_UNIQUE_ID is available In the Attachment grid only the @DOCUMENT_PATHNAME is available. In all the other grids both parameters are available.
Simple example to show the data retrieved; you can doubleclick a record in the tree and then on a grid (and then on the Attachments grid) to see behavior differences.
.VBSCRIPT
Sub main()
DBWInit(TRUE)
docUid = DBWInput("@DOCUMENT_UNIQUE_ID")
docpath = DBWInput("@DOCUMENT_PATHNAME")
DBWMsgbox "uid = " & docUid & vbcrlf & "path = " & docPath
End Sub
In this case it's shown how to change the default behavior of the doubleclick from Open action to View Record action.
.VBSCRIPT
sub main()
DBWInit(TRUE)
docUid = DBWInput("@DOCUMENT_UNIQUE_ID")
DBWShell("ViewRecord " & docUid)
end sub