DBWCreateEDrawing

<< Click to Display Table of Contents >>

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

DBWCreateEDrawing

Description

Creates the "eDrawing 2" file (*.EPRT, *.EASM or *.EDRW) of the selected object ( part, assembly or drawing ), in the same directory where the object file resides.

Syntax

Function DBWCreateEDrawing(unique_id)

Parameters

unique_id

the unique id of the object to create an eDrawing of

Remarks

The eDrawing file name is composed as follows:

<original file name>.<configuration>.<eDrawing extension>
The function is CONFIGURATION sensitive and can be used to create multiple eDrawings of different configurations ( when running, of course, with the DBWorks->Options->Configuration option activated ).

See also

DBWCreateEDrawingAs

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)
  if DocUidArray(i)<>"0" then
   DBWCreateEDrawing( DocUidArray(i) )
  end if
 next
 call DBWShell( "ShowBrowser" )
End sub