|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Document > OnClose.LST script file |
It is executed every time a CAD document is closed from a Mechworks client.
Currently the script is available for DBWorks only (client for Solidworks).
Options→Open/Save
@DOCUMENT_PATHNAME |
full path name of the document that's being closed |
|---|---|
@DOCUMENT_FNAME |
file name of the full path name |
@DOCUMENT_FEXT |
file extension of the full path name |
@DOCUMENT_FDIR |
file directory of the full path name |
@DOCUMENT_UNIQUE_ID |
when greater than 0, the unique ID of the Closeed document |
@CLOSE_TYPE |
0: the document is unloaded from memory; |
.VBSCRIPT
sub main
DBWInit(TRUE)
pathname = DBWInput("@DOCUMENT_PATHNAME")
fname = DBWInput("@DOCUMENT_FNAME")
fext = DBWInput("@DOCUMENT_FEXT")
fdir = DBWInput("@DOCUMENT_FDIR")
uid = DBWInput("@DOCUMENT_UNIQUE_ID")
closeType = DBWInput("@CLOSE_TYPE")
if closeType=0 then
CloseMsg = "Unloaded from memory"
elseif closeType=1 then
CloseMsg = "Just hidden"
else
CloseMsg = "#ERR# Unmanaged value"
end if
dbwmsgbox1 "pathname= " & pathname & vbcrlf & _
"fname= " & fname & vbcrlf & _
"fext= " & fext & vbcrlf & _
"fdir= " & fdir & vbcrlf & _
"uid= " & uid & vbcrlf & _
"closeType= " & CloseMsg ,"OnClose.LST"
end sub