saveAsEDrawing Method

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Object Reference > DBWJComp Methods >

saveAsEDrawing Method

MechWorks MWScriptGUI Scripting Utility Object

saves a CAD document in the eDrawing format.

Syntax

public void saveAsEDrawing(Variant original, Variant copy) throws VBException

Remarks

Requires eDrawings 2007 or 2008

The function displays a window for the conversion of the file and throws an exception if the conversion fails. The exception must be handled from the calling code.

Note that if you set an invalid file name as output (for instance 'my Drawing.pdf') the conversion stops because the eDrawing control displays a proprietary message box.

Example (vb code)

Set codeObject = CreateObject("DBWJComp.CodeObject")
codeObject.saveAsEDrawing "D:\temp\swFiles\lunar\NEARSIDE LOCKER.SLDDRW","d:\temp\NEARSIDE LOCKER.edrw"
Set codeObject = nothing