FAQ for LDraw file types
Everything you wanted to know about the different kinds of files in the LDraw Parts Library
What's with 'file types'? Aren't they all just DAT files?
Yes, all the files in the LDraw Parts Library are DAT files.
But different files are included in the library for different reasons.
Different rules sometimes apply to different files.
What are the different file types?
The main five types of files are:
- Parts
- Simple parts
- Complete/composite parts
- Modelling Shortcuts
- Modellers' Subparts
- Official Number/Color Shortcuts
- Subparts
- Primitives
- Hi-Res Primitives
- Low-res Primitives
How are the different classes of Parts identified?
A: Files in the parts folder are classified on the format of the filename and the
initial character of the part description.
- Simple parts
A regular part moulded in a single piece, such as the 2x4 brick 3001.dat. These have a numeric filename (or if patterned, numeric with a "pxx" suffix). - Complete/composite parts
A part comprising more than one moulding, but issued in an assembled form. Such parts are identifiable by the presence of a "cxx" suffix. The individual parts have a numeric filename but are identified with a leading tilde "~" in the part description. - Modelling Shortcuts
- Modellers' Subparts
- Official Number/Colour Shortcuts
On the rare occasions when we know of the official complete Lego part number (which is specific to the colour) this is added to the library as a shortcut. Such parts have a numeric filename but are identified with a leading underscore "_" in the part description.
What are subparts, when should they be used, and how are they numbered?
A: Subparts may be used for four purposes,
and in all cases are stored in the \s subdirectory and referenced from
a main part with a type 1 line.
1 <colour> 0 0 0 x 0 0 0 y 0 0 0 z s\nnnnSnn
- A part has many patterned versions
- The part has a high degree of symmetry
- Some elements are shared between several parts
Example: the minifig torso, see 973.dat and s\973s01.dat.
The plain (non-decorated) regions of the part are created as a subpart, which is referenced (with a type 1 line) by the main part file and each of the decorated part files. The subpart would be named by appending S01 to the main part file name.
Example: some of the wheels, such as 2593.DAT.
As a way of reducing the size of the part files, the repeated region is created as a subpart and referenced several times by the main part file. Multiple subparts may be utilised if needed. Such subparts are typically numbered by appending Snn to the main part file name.
Example: the Wolfpack flag 2335P44.DAT and shield 3846P44.DAT .
Such subparts are also numbered by uniquely modifying the patterned part number, but may be referenced from more than one base part file.
Please note: we will not be converting existing official subfiles that were created because of the color restriction. Now that they are official, they can stay right where they are.
Is file size really important?
Hard drives may be cheap, but bandwidth is not.
Most people still connect to the Internet through dial-up modems.
And many people have to pay by the minute while they are connected.
Reducing the size of part files not only reduces the space required to store parts,
it also reduces the time it takes to download the parts.