Scroll to navigation

LEOCAD(1) General Commands Manual LEOCAD(1)


LeoCAD - CAD program for LEGO models.


leocad [ infile [ -i [ outfile.ext ] [-w x] [-h y] ] ] [-l path]


LeoCAD is a CAD program for creating virtual LEGO models. It has an easy to use interface and includes thousands of different parts in its library.


Below is a summary of all of the options that LeoCAD accepts. Most options have two equivalent names, one of which is a single letter preceded by -, and the other of which is a long name preceded by --. Brackets ([ and ]) indicate that an option takes an optional argument.

Loads the project file infile

-i [outfile.ext]
--image [outfile.ext]
Saves a picture to outfile.ext in the image format specified by ext and exits. If outfile is not given then the program will use a name based on infile. The file format is selected by ext and can be gif, bmp, png or jpg (if ext is not present then the default preferences format will be used).

-w width
--width width
Sets the width of the picture to width.

-h height
--height height
Sets the height of the picture to height.

-f time
--from time
Start saving pictures at the step time.

-t time
--to time
Save pictures until the step time.

-m model
--model model
Sets the active submodel to model.

-c camera
--camera camera
Sets the active camera to camera.

--viewpoint front back left right top bottom home
Sets the viewpoint to one of the predefined angles.

Use an orthographic projection.

Adds a border around the pieces in the step they appear when saving pictures.

-l path
--libpath path
Use alternate parts library found in path . The Linux version of LeoCAD uses /usr/share/leocad/ as the default.

-obj [outfile.obj]
Exports the model to wavefront format.

-3ds [outfile.3ds]
Exports the model to 3DS format.

-dae [outfile.dae]
Exports the model to COLLADA DAE format.

-html [path]
Creates an HTML page for the model.

--html-parts-width width
Sets the width of the part pictures when creating HTML pages to width.

--html-parts-height height
Sets the height of the part pictures when creating HTML pages to height.


``LEOCAD_LIB'' may be set to the path of the parts library.


$ leocad car.lcd -i car.png -w 640 -h 480

This will start LeoCAD, load the file "car.lcd," create a png called "car.png" with a resolution of 640x480 and exit when done.


~/.config/LeoCAD Software/LeoCAD.conf
User preferences file


If you find any bugs please report them at


LeoCAD is written by Leonardo Zide <>. You can visit the LeoCAD homepage at

This manual page was written by Patrick Mahoney <>, for the Debian GNU/Linux system (but may be used by others).

20 July 2000