|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Revision > OnFreeze.LST script file |
It is executed when freezing a document.
Using this script it is possible to control the way a document is frozen, basing on rules that can be implemented in the script itself.
Options→Revisions
This script is only intended to be a way to allow freezing or not.
Any other action (such as variant notes updating) must be performed starting from the OnOk.LST script (checking the case of parameter STATE=OBSOLETE)
@DOCUMENT_UNIQUE_ID |
uid of the doc to freeze |
|---|---|
@IS_POST_EVENT |
0: if the script is executed before the freeze action |
@OKFREEZE |
0: do not freeze |
this directive is effective only if outputted in the pre-event context
This script asks for proceeding with freeze process or to halt it.
.VBSCRIPT
Sub main
DBWInit(TRUE)
isPost = DBWInput("@IS_POST_EVENT")
If isPost=0 Then
'pre event
resp = DBWMsgbox2("Are you sure you want to proceed with FREEZE action? " & vbcrlf & "The action is not reversible",32 OR 4,"OnFreeze.LST")
If resp = 6 Then 'VByes
DBWoutput "@OKFREEZE",1,ForWriting
else
DBWoutput "@OKFREEZE",0,ForWriting
End If
Else
'post event
End if
End Sub