|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > NeutralFormat > OnCreateMasterDrawing.LST script file |
available from build: 20040603
It is called when passing from Checkout→Checkin (with the drawing opened ): SaveAs PDF/TIFF the active drawing
LST folder
The script is fired if existing and if the Master Drawing Mode is active
@MASTER_DRAWING_FILE_TYPE |
|
|---|---|
@MASTER_DRAWING_SUGGESTED_DIRECTORY |
|
@MASTER_DRAWING_SUGGESTED_PATHNAME |
@MASTER_DRAWING_OK_RENAME |
|
|---|---|
@MASTER_DRAWING_TEMPORARY_PATHNAME |
|
@MASTER_DRAWING_PATHNAME |
this script has been adapted for each class of documents in order to drive correctly the application for generating a PDF file with the proper name.
.VBSCRIPT
sub main()
DBWInit(TRUE)
...
'useful inputs available
pathName = DBWInput("@DOCUMENT_PATHNAME")
fName = DBWInput("@DOCUMENT_FNAME")
fExt = DBWInput("@DOCUMENT_FEXT")
fDir = DBWInput("@DOCUMENT_FDIR")
DocUid=DBWInput("@DOCUMENT_UNIQUE_ID")
if masterDrawingFileType = 0 then
ext = ".PDF"
else
ext = ".TIF"
end if
if( fExt = ".DOC" ) then
' manage the creation of the PDF for a .DOC
Set fso = CreateObject("Scripting.FilesystemObject")
fso.CopyFile <my application generated PDF file>,masterDrawingFileName
exit sub
end if
...
End sub