Running Isodraw from the Command Line

Submitted by: Liz Fraley Last Updated: 2010-08-09

=Problem=

The question is typically:

I need to start a batch process from the commandline. Is that possible using the macro language or the Batch Tool? How?

=Solution=

Originally posted by Trevor Hendricks Yes, it is possible to either invoke macros from the commandline or to control the Batch Tool by doing so.

How to start a macro from the commandline
Any macro can get invoked by the use of this commandline syntax: IsoDraw7.exe" { [-macro <"macroname">]}

For IsoDraw7 use the following syntax: C: CD ptc CD Program IsoDraw7.exe C:\Convert\m_test.iso -macro"Debug" Using that syntax, you might call IsoDraw and open any particular illustration to apply some changes, defined in a macro, to it (like deleting unused pens) and after that save the results.

How to start the Batch Tool from the commandline
The Batch Tool is implemented as a plugin to IsoDraw. These plugins are located in the extensions folder and it is possible to send commandline-events to them by the use of this syntax: IsoDraw.exe -ext  The argument string will be sent directly to the plugin, which processes it then. The arguments-string of the Batch Tool is build like this: -s "srcPath" quoted path of source folder -d "dstPath" quoted path destination folder -f format format options (see kIsoFormat_Standard) [-c] scale scale (optional, default 100%) [-m] "macro" quoted path marco to be excuted on each illustration (optional)

Where the possible format identifiers are: Standard       0 Iso0400        1 Iso0300        2 Iso0260        3 EPSF           4 AI_1_1         5 AI_88          6 IGES           7 DXF            8 HPGL           9 CGM           10 PICT          11 TIFF          12 BMP           13 PCX           14 CALSRaster    15 TEXT          16 INT           17 MIF           18 Iso0500       19 Iso0500Packed 20 DWG           21 SVG           22 JPEG          23 PNG           24 WMF           25 Iso0600       26 Iso0600Packed 27 As a result, the commandline to initiate an export of a source folder 'd:\sources\dxf' into a destination folder 'e:\destination\cgm' and a call of a macro 'CleanupPens' for each file, will need to look like: IsoDraw6.exe -ext batch6.isp -s"D:\sources" -d"e\destination\cgm" -f10 -m"cleanuppens"