DBWCreateEDrawingAs

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > CADSystem >

DBWCreateEDrawingAs

Description

Saves the current opened SW document as an eDrawing file, building the file name as: eDrawingRoot+eDrawingID+ <extension specific to the document type>

Syntax

Function DBWCreateEDrawingAsunique_id, eDrawingRoot, eDrawingIDbyref eDrawingFullPathName)

Parameters

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

Results

TRUE

if the eDrawing is successfully created

FALSE

otherwise

eDrawingFullPathName

full path name of the saved eDrawing

Remarks

eDrawings 2.0 has to be installed on the machine.

See also

DBWCreateEDrawing

Example

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