Description of command line parameters


Acme CAD Converter supports to run on command line mode.

This demo will show you how to use it in a C# project, click this link to download it

Command line format

AcmeCadConverter [/r] [/e] [/m] [/info] [/l filaname] [/ls] [/info] [/p integer] [/w integer] [/h integer] [/b integer] [/j integer] [/f integer] [filename] [filename] ...

Acme CAD Converter command line meaning:

  • /r It will run on command line mode, immediately convert, and exit after the conversion is completed. If there was not such a parameter, Acme CadConverter can open this file in a simple way.
  • /e Auto zoom extend.
  • /ls Uses layout paper size if possible.
  • /m Includes mask raster file
  • /wm Enables to output the preset watermark.
  • /wmfile Enables to output the preset watermark in a wmk file, example: /wmfile "c:\wm\1.wmk".
  • /l filename Generate conversion report in the filename of a file, if there was no such a parameter, then report file can not be generated.
    Note: This parameter must be specified after /r parameter, otherwise it will be invalid.
  • /p integer Indicate the raster pixel format, [1 -- 1_bit format, 2 -- gray format, 3 -- 256 colors], default is 3--256 colors
  • /w integer Raster width, default is 800.it also supports the unit flag, such as (420mm = 420 mm, 11in = 11 inch), if you do not specify the unit flag, the unit will be pixels default.
  • /h integer Indicate the raster height, default is 600, the unit flag is the same as the '/w' parameter.
  • /res integer the output quality, it is represented with DPI, it means how many pixels per inch.
  • /ad detects and fits the current page size for the converted drawing.
  • /b integer Indicate background color index, [0-black, 1-red, 2-yellow, 3-green, 4-aqua, 5-blue, 6-Magenta, 7-White, 8-Dark Gray], the other colors please refer to the set color dialog. Default is 7-white
  • /j integer Indicate the jpeg quality, 1-lower, 10-highest, default is 10
  • /i When you set this parameter and when you open the file and unable to find the “shx file”, it will no longer prompt the user, instead the name of such file will be written to a report file (if a report file needs to be so generated).
  • /f integer Raster file format,
    1 -- bitmap format(*.bmp),
    2 -- Jpeg format(*.jpg),
    3 -- GIF format(*.gif),
    4-- PCX format(*.pcx) ,
    5-- TIFF fromat(*.tiff),
    6--PNG format(*.png),
    7--TGA format(*.tga),
    8- WMF format(*.wmf),
    101 -- SVG format , (*.svg)
    102 -- HPGL *.PLT format ,  (*.plt)
    103 -- HPGL *.HGL format ,  (*.hgl)
    104 -- PDF format(*.pdf),
    105 -- Converts more drawing files into one PDF file(*.pdf),
    109 -- PDF (per PDF file for per layout) (*.pdf)
    106 -- SVGZ (Compressed scalable vector graphics), (*.svgz)
    107 -- CGM (Computer graphics metafile), (*.cgm)
    108 -- EPS(Encapsulated PostScript), (*.eps)

  • default is 1-- Bitmap format.
  • /d The output folder or PDF filename :
       when using '/f105' , it should look like '/d pdf_file_name', the PDF filename when convert more drawing files into one PDF file, else the option will specify a folder that  the program will save all output into, Such as: /d "c:\output\1\"
  • /o The outputted file name:
    Specify the outputted file name by option /o, for example: /f 104 /o "c:\output\my", the converter will add a correct filename extension by the output type, the outputted file name will be "c:\output\my.pdf", this option can not work with option /a -2 or /a -3
  • /_ File name separative sign, For example: a DWG file "test.dwg", when exporting the "layout1" layout of the drawing into PDF format, if you using this option, the output should be "test_layout1.pdf", the default is '/-'.
  • /- Uses '-' letter as file name separative sign, if you using this option, in the example above the output should become "test-layout1.pdf".
  • /a Layout Index is a interger number, the follows is the meanings:
    0 : Always converts model space .
    1 : Converts the 1st layout.
    2 : Converts the 2nd layout, and so on.
    -1 :Converts the current layout.
    -2 :Converts all layouts.
    -3 :Converts all paper space layouts
    layout list file name: also you can specify a layout list to tell the converter which layouts need to be exported, the format looks like the below.
    /a "c:\cfg\layoutcfg.txt", the below will show you layoutcfg.txt:
    "layout1"
    "A2"
    "A3"
    "DWF*"
    it supports wildcard character such as: *, ?

  • /pw Use pen-set, you must follow a pen-set name after '/pw' when use this option, such as: /pw myset, About the pen-set, you can create it with pen sets dialog box in this program.
  • /lw Enable the line weight option.
    1. /lw 1 to enable to use plot style and the line weight option.
    2. /lw 2 to enable to use plot style, but ignore the line weight option.
    3. /lw 0 to disable it (default)
  • /info Export entity informations, such as type,layer,color,linetype... ,(only use to export to svg file);
  • /bookmark Export bookmark information into PDF file.
  • /layer Export layer information into PDF file.
  • /hide Specify the hidden line removal mode:[0-None, 1-Automaticlly, 2-Forcibly].
  • /scale Export by scale,  the parameter need to be follwed a value(double) to tell the program scale the drawing, at present, it is available when export to pdf.
  • /margin margin of the output page, the unit is always set to inch, this option is only valid when you use '/scale' option.
  • /key Registration code. Sometimes CAD Converter can't read the registration code from register table at command line mode, so you can specify the registration code with this parameter.
  • /layerop Set the layer status by a layer config file, the below is the description on each item in a line.
    each line in the config file includes two items:layer_name and status, for example:
    "0" 1
    "*" 0
    it means: ("*" means all layers)
    1. set the layer "0" to on
    2. set other layers to off
  • /resource it allows you specify the path list for the resource files( such as: fonts, images, xref blocks...) and set the font replace options, the config fileis in INI format,
    [path list]
    dir_0=c:\fonts
    dir_1=d:\cadfonts
    dir_2=d:\images
    dir_3=d:\ref_blocks
    [replace fonts]
    enabled=true
    only_ttf=false
    ttf_font=Arial
    small_font=txt
    big_font=hzdx
    [end]

    Here is a example to show you how to use it:
    AcmeCADConverter /r /resource "c:\setting\searchres.ini" /e /ls /p 1 /f 104 /w 1200 /h 800 /a -2 /bookmark "d:\test.dwg"

Note

1. Files in front of /r parameter can be opened simply, only those after /r parameter can be converted instantly.

2. No need to assign a name to raster file, because Acme Cad Converter will generate the name automatically according to the format of the raster file (to be specified by /f parameter), such as a.dwg -> a.bmp, or a.dwg -> a.gif.

3. Raster file and DWG file are in the same directory.

4. Parameter /l for generating report file must be specified immediately after the conversion of parameter /r, otherwise it will be invalid.

5. Format and meaning of the report file

6. When you convert more drawing files into one PDF file, you can't set the width or height to 0, and 1 unit of widht or height is 1/72 inch, but CAD Converter will increase 30 units because the page margin is 15 units.


Report

a. Each line uses an integer to indicate one conversion report;

b. Meaning of the integer:

  • 0 --> Conversion successful
  • 1 --> Memory insufficient
  • 2 --> Drawing failed
  • 3 --> File open failed
  • 4 --> Invalid file

Unit

In the HPGL file: 1 unit = 1/42 mm

In the PDF file: 1 unit = 1/72 inch

Example:

AcmeCADConverter /r /e /ls /p 1 /f 104 /w 1200 /h 800 /a -2 /bookmark /hide 1 /pw "penset" "d:\test.dwg"

Converts d:\test.dwg with the below parameters,

  1. Auto zoom extend.
  2. Use layout paper size if possible.
  3. output 1_bit format.
  4. output to PDF format.
  5. output width is 1200 unit.
  6. output height is 800.
  7. convert the all layouts.
  8. Export the bookmark.
  9. hidden line removal mode: Automaticlly.
  10. Use pen width set, the set name is penset that maybe created by you. 
New

AcmeCADConverter /r /ad /ls /p 1 /f 104 /w 17in /h 11in /res 400 /a -2 /pw "penset" "d:\test.dwg"

Converts d:\test.dwg with the below parameters,

  1. Detects and fits the current page size for the converted drawing, it also does the 'Zoom extend' action.
  2. Use layout paper size if possible.
  3. output 1_bit format.
  4. output to PDF format.
  5. output width is 17 inch(if possible).
  6. output height is 11inch(if possible).
  7. convert the all layouts.
  8. Use pen width set, the set name is penset that maybe created by you. 
  9. Set the quality of the output to 400DPI.

AcmeCADConverter /r /e /scale 100.0 /margin 0.05 /p 1 /f 104 /a -2 /pw "penset" "c:\test\1.dwg" "c:\test\2.dwg"

  1. Auto zoom extend.
  2. output 1_bit format.
  3. output to PDF format.
  4. Export by scale.
  5. Set the margin to 0.05 inch.
  6. convert the all layouts.
  7. Use pen width set, the set name is penset that maybe created by you. 

AcmeCADConverter /r /e /scale 100.0 /margin 0.05 /p 1 /f 105 /a -2 /pw "penset" /d "c:\out\all.pdf" "c:\test\1.dwg" "c:\test\2.dwg"

  1. Auto zoom extend.
  2. Output 1_bit format.
  3. Output to PDF format.
  4. Export by scale.
  5. Set the margin to 0.05 inch.
  6. Converts multi- drawing files into one PDF file.
  7. Converts the all layouts.
  8. Use pen width set, the set name is penset that maybe created by you. 

Meaning of command line parameters during version conversion

AcmeCadConverter [/g[version]] [/x[version]] srcfile destfile
/g Indicates conversion to DWG file
/x Indicates conversion to DXF file

Numerical value and meaning of version (specially for AutoCAD):

  • 25 -> Version 2.5
  • 26 -> Version 2.6
  • 9 -> Version 9
  • 10 -> Version 10
  • 11 -> Version 11
  • 12 -> Version 12
  • 13 -> Version 13
  • 14 -> Version 14
  • 2000 -> Version 2000
  • 2004 -> Version 2004
  • 2007 -> Version 2007
  • 2010 -> Version 2010

If there is no version parameter, the default one should be Version 2004.

Explanation
After the conversion is done, close this program immediately. /g or /x parameter must be placed in front of the filename, and the sequence of source file and object file can’t be reversed. Only one file can be converted at a time, but the same parameter can be used repeatedly to convert multiple files, please refer to the following example for details. Conversion of this version also supports log function, and the application method is identical with the above. Note: -/r parameter must also be added in front of /l parameter, and this /r parameter will not affect the subsequent function of version conversion. Please refer to the above for the meaning of log file.
Example
1. AcmeCadConverter /g14 a.dwg a14.dwg

Convert a.dwg to a14.dwg, a DWG file in Version 14.0.

2. AcmeCadConverter /x10 a.dwg a10.dxf

Convert a.dwg to a10.dxf, a10 DXF file in Version 10.0.

3. AcmeCadConverter /x2007 a.dxf a2007.dxf

Convert a.dxf to a2007.dxf, a2007 DXF file in Version 2007.

4. AcmeCadConverter /r /l Convert.log /x10 a.dwg a10.dxf /g14 b.dxf b14.dwg /g10 c.dwg c10.dwg /x d.dxf d2000.dxf

Conversion of multiple files shall be done according to the sequence as shown in the following example, and at the same time, the conversion result should be recorded in convert.log file:

1) Convert a.dwg to a10.dxf, a10 DXF file in Version 10.0.

2) Convert b.dxf to b14.dwg, a14 DWG file in Version 14.0.

3) Convert c.dwg to c10.dwg, c10 DWG file in Version 10.0.

4) Convert d.dxf to d2000.dxf, d2000 DXF file in Version 2000.

Convert multi- drawing files into one PDF file new

AcmeCadConverter /r /e /w 792 /h 612 /f 105 /d demo.PDF campus.dwg cirarc.dwg jyy.DWG

The example command line will convert the three dwg files: campus.dwg, cirarc.dwg and jyy.dwg into one PDF file: demo.pdf, the PDF page size is approximate 11x8.5 inch.



Copyright (c) 2014 DWG Tool Software