# Command Line Options | LeoCAD

## Command Line Options

LeoCAD can be used to generate images or export files from the command line.

`$ leocad [options] [file]`

#### Options

-l, --libpath <path>

Set the Parts Library location to path.

-i, --image <outfile.ext>

Save a picture in the format specified by ext and exit.

-w, --width <width>

Set the picture width.

-h, --height <height>

Set the picture height.

-f, --from <step>

Set the first step to save pictures.

-t, --to <step>

Set the last step to save pictures.

-s, --submodel <submodel>

Set the active submodel.

-c, --camera <camera name>

Set the active camera.

--viewpoint <viewpoint>

Set the view to one of the preset viewpoints (front, back, left, right, top, bottom, home).

--camera-angles <latitude> <longitude>

Set the camera angles in degrees around the model.

--camera-position <x> <y> <z> <tx> <ty> <tz> <ux> <uy> <uz>

Set the camera position, target and up vector.

--camera-position-ldraw <x> <y> <z> <tx> <ty> <tz> <ux> <uy> <uz>

Set the camera position, target and up vector using LDraw coordinates.

--orthographic

Render images using an orthographic projection.

--fov <degrees>

Set the vertical field of view used to render images.

--zplanes <near> <far>

Set the near and far clipping planes used to render images.

--fade-steps

Render parts from prior steps faded.

--no-fade-steps

Do not render parts from prior steps faded.

--fade-steps-color <#AARRGGBB>

Renderinng color for prior step parts.

--highlight

Highlight parts in the steps they appear.

--no-highlight

Do not highlight parts in the steps they appear.

--highlight-color <#AARRGGBB>

Rendering color for highlighted parts.

--shading <mode>

Select shading mode for rendering (wireframe, flat, default, full).

--line-width <width>

Set the width of the edge lines.

--aa-samples <samples>

AntiAliasing sample size (1, 2, 4, or 8).

-ss, --stud-style <style>

Set the stud style (0=No style, 1=LDraw single wire, 2=LDraw double wire, 3=LDraw raised floating, 4=LDraw raised rounded, 5=LDraw subtle rounded, 6=LEGO no logo, 7=LEGO single wire).

-nscc, --disable-stud-cylinder-color

Disable high contrast stud cylinder color.

-scc, --stud-cylinder-color <#AARRGGBB>

High contrast stud cylinder color.

-nec, --disable-edge-color

Disable high contrast edge color.

-ec, --edge-color <#AARRGGBB>

High contrast edge color.

-nbec, --disable-black-edge-color

Disable high contrast edge color for black parts.

-bec, --black-edge-color <#AARRGGBB>

High contrast edge color for black parts.

-ndec, --disable-dark-edge-color

Disable high contrast edge color for dark color parts.

-dec, --dark-edge-color <#AARRGGBB>

High contrast edge color for dark color parts.

-aec, --automate-edge-color

Enable automatically adjusted edge colors.

-cc, --color-contrast <contrast>

Color contrast value between 0.0 and 1.0.

-ldv, --light-dark-value <value>

Light/Dark color value between 0.0 and 1.0.

-obj, --export-wavefront <outfile.obj>

Export the model to Wavefront OBJ format.

-3ds, --export-3ds <outfile.3ds>

Export the model to 3D Studio 3DS format.

-dae, --export-collada <outfile.dae>

Export the model to COLLADA DAE format.

-csv, --export-csv <outfile.csv>

Export the list of parts used in csv format.

-html, --export-html <folder>

Create an HTML page for the model.

-v, --version

Output version information and exit.

-?, --help

Display help message and exit.