|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Project > OnAddToRemoveFromProject.LST script file |
available from build: 20100915
The new script is invoked after a document is added or removed from a Project.
Using the script, the user can do any action useful for properly rearranging the Project structure after a document is added to or removed from a Project.
LST folder
It is executed if existing in the LST folder.
The script is invoked only for the documents moved using the User Interface; it is not invoked for any document moved since of the Link Mode or any other relation.
@DOCUMENT_UNIQUE_ID |
the document unique id |
|---|---|
@PROJECT_UNIQUE_ID |
the project unique id |
@IS_REMOVE_FROM_PROJECT |
0: if the Document is added |
.VBSCRIPT
sub main()
DBWInit(TRUE)
docUid = DBWInput("@DOCUMENT_UNIQUE_ID")
projUid = DBWInput("@PROJECT_UNIQUE_ID")
isRemove = DBWInput("@IS_REMOVE_FROM_PROJECT")
if isRemove="1" then
isRemoveStr = "has been removed from"
else
isRemoveStr = "has been added to"
end if
DBWMsgBox "Doc uid=" & docUid & vbcrlf & isRemoveStr & vbcrlf & "Proj uid=" & projUid
end sub