|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > CADSystem > DBWCreateEDrawingAs |
Saves the current opened SW document as an eDrawing file, building the file name as: eDrawingRoot+eDrawingID+ <extension specific to the document type>
Function DBWCreateEDrawingAs( unique_id, eDrawingRoot, eDrawingID, byref eDrawingFullPathName)
unique_id |
unique id of the document |
|---|---|
eDrawingRoot |
folder where the eDrawing will be created into |
eDrawing |
base filename of the eDrawing will be created |
TRUE |
if the eDrawing is successfully created |
|---|---|
FALSE |
otherwise |
eDrawingFullPathName |
full path name of the saved eDrawing |
eDrawings 2.0 has to be installed on the machine.
The following sample is available as CreateEDrawing.vbs in the LST\DEMO_VBS sub-directory.
sub main()
DBWInit(True)
DBWShell("GetSelection")
if okDBW = False then
exit sub
end if
DBWShell( "MinimizeBrowser" )
selection = DBWResult("@SELECTION")
DocUidArray= Split(selection, ",", -1, 1)
for i=0 to ubound(DocUidArray)
eDrawingID = eco_id + "_" + tokens(i)
DBWShell("PrintInfo " & replace("DBWorkFlow is creating the eDrawing " & eDrawingID," ","|") )
ok = DBWCreateEDrawingAs( tokens(i), eDrawingsRoot, eDrawingID, eDrawingFullPathName )
next
call DBWShell( "ShowBrowser" )
End sub