LDraw.org Standards: MPD Language Extension

Maintained by: The LDraw.org Standards Committee
Writers: Steve Bliss, Orion Pobursky
Revision: 1


Guidelines for the proper naming of OMR files


MPD files or "Multi-Part Documents" are a way to combine several LDraw files into one consolidated source. This allows for ease in posting or emailing a model made up of many subparts.


The MPD file uses 2 META Commands, only one of which is commonly used. The common statement is 0 FILE, the less common statement is 0 NOFILE.

To create a MPD file simply include the code for each individual file in the MPD file. At the beginning of each file's text, insert a 0 FILE statement. This separates and names the files.

The end of each file, or just the last file in the MPD, may be marked with a 0 NOFILE line. The 0 NOFILE command is only required if the file's contents are followed by non-LDraw content (such as the poster's signature lines).

In order to support the inclusion of LDraw files in message systems (like email), any text lines before the first 0 FILE statement will be discarded. It is considered to be an error for any LDraw code (other than comment lines) to appear before the first 0 FILE statement. Also, no LDraw commands should appear after a 0 NOFILE statement, and before the next 0 FILE statement.

When an MPD file is used to store a multi-file model, the first file in the MPD is treated as the 'main model' -- all other files in the MPD will only be rendered if they are referenced by the main model, directly or indirectly.

So far, there are no clear scoping or namespace rules on MPD files. If you put a file named stud.dat in your MPD file, don't be surprised to see your stud.dat file appear on the top of every single brick in your scene.

MPD META Statements


Format: 0 FILE <model>

<model> is the name of the following LDraw file.


Format: 0 NOFILE

There are no options or parameters.

Note: This document is an official LSC specification and/or language extension. Material changes can only be made after ratification by the LSC.
Website copyright ©2003-2020 LDraw.org, see Legal Info for details.
LDraw™ is a trademark owned and licensed by the Estate of James Jessiman

LDraw.org is powered by CMS Made Simple.
LEGO® is a registered trademark of the LEGO Group, which does not sponsor, endorse, or authorize this site. Visit the official Lego website at http://www.lego.com.
LDraw is a completely unofficial, community run free CAD system which represents official parts produced by the LEGO company.