Home :: Login :: Forgot Password :: Search :: FAQ
Support our host

News

Software

Reference

Community

Parts Library

About Us

Reference > Specifications
Published By Tim on Thursday, May 29, 2003 - 07:39 PM

Printer-friendly page

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


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

FILE

Format:
0 FILE <model>

Where:

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

NOFILE

Format:
0 NOFILE

There are no options or parameters.


Note: This document is an offical LSC specification and/or language extension. Material changes can only be made after ratification by the LSC.



Recipient 2007
Kevin Clague

Want to learn more about LDraw? Check out the following books:




Current Contest Winners

Model of the Month


Scene of the Month



Vote for Next Month's Winner

Submit Your Creation for Next Month's Contest

What's new in lugnet.cad?

Submission for MOTM/SOTM/POTM closes in a week
by Willy Tschager - 8 hours ago

Re: Blender to LDraw exporter (Blend2Dat v0.2)
by Stefan Garcia - 4 days ago

Re: Blender to LDraw exporter (Blend2Dat v0.2)
by Philippe Hurbain - 5 days ago

Re: Blender to LDraw exporter (Blend2Dat v0.2)
by Stefan Garcia - 5 days ago


There are 76 unlogged users and 0 registered users online.

You can log-in or register for a user account here.





 


 Log in Problems?
 New User? Sign Up!

©2003-2008 LDraw.org, see Legal Info for details.
LDraw™ is a trademark owned and licensed by the Estate of James Jessiman
This website is powered by Peeron.com.

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.