©2003-2006 LDraw.org

Tutorial: What Are And How Do I Use The LDraw File Model Comments [1]

Posted by : ahui on Sep 07, 2003 - 01:44 AM
referenceTutorials [2]
Using The LDraw File Model Comments
  • What are the LDraw file model comments and why used them [3]
  • How do I add comments to my LDraw model file. [4]
What are the LDraw file comments and why used them
TOP [5]
Family House Image
Figure 1: Family Home, Creator UNKNOWN (Click on the image to enlarge)
This wonderful model of a family home will never be able to create the proper credit it deserves. Can you guess why? The LDraw model ONLY provides the actual model! There is no name of the person who created it, when it was created, or any other information that could have been used to properly document this model.

Unless the author stumbles across this tutorial in the vastness of the internet the true owner will never be identified. You can avoid this faith to your models by provideing comments within the model before posting them to the world wide web.
How Do I Add Comments To My LDaw Model File
TOP [6]
There are several ways of adding comments to your LDraw models. In this tutorial we will discuss the "old-fashion" way of adding comments by using a text editor.
Step 1 Open your LDraw model file using any text editor. For our example we will use Microsoft NOTEPAD and the blocks.ldr [7] model file.
Step 2 Looking at the blocks.ldr file in a text editor will show you the following:

0 Name: Blocks.ldr
0 Author: MLCAD
0 Unoffical LEGO Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 4 0 0 0 -1 0 0 0 1 0 0 0 -1 3001.DAT
1 1 -40 24 0 0 0 -1 0 1 0 1 0 0 3001.DAT
1 1 40 24 0 0 0 -1 0 1 0 1 0 0 3001.DAT
1 14 0 -24 0 0 0 1 0 1 0 -1 0 0 30165.DAT
0


In an LDraw model file comments are denoted by beginning a line with a "0". As you can see there are five (5) comment lines in this file.
Step 3 Comments are subjective to each person but the "ideal LDraw" file would have the following information:
  • Name of file
  • Author
  • e-Mail of Author or some method of contacting author
  • URL (website of author or where the file can be found)
  • Copyright date
  • Anything else you want


So how do you add all this information? Simple, just add comment lines to your file!
Step 4 Our new bricks-comments.ldr [8] file shows what our comments would look like.

0 Name: Blocks.ldr
0 Author: LDraw Help Desk
0 e-Mail: help (at)ldraw.org
0 http://www.ldraw.org/
0 Copyright 2003
0 This is a sample ldraw model
0 It shows how to add comments to a file

0 Unoffical LEGO Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 4 0 0 0 -1 0 0 0 1 0 0 0 -1 3001.DAT
1 1 -40 24 0 0 0 -1 0 1 0 1 0 0 3001.DAT
1 1 40 24 0 0 0 -1 0 1 0 1 0 0 3001.DAT
1 14 0 -24 0 0 0 1 0 1 0 -1 0 0 30165.DAT
0


Save the file once you are done and that is all. If you are using Microsoft NOTEPAD you will need to select the "Save as Type" and choose "All Files" before saving your LDraw file. Otherwise your model wil be renamed to <model-name>.ldr.txt
 

Help Desk Tutorial: LDraw File Comments
Version 1.0
Created by Ahui Herrera [9], LDraw Help Desk [10]
Links
  [1] http://www.ldraw.org/index.php?name=News&file=article&sid=100
  [2] http://www.ldraw.org/index.php?name=News&catid=&topic=6
  [3] http://www.ldraw.org/#What_Is
  [4] http://www.ldraw.org/#Step_By_Step
  [5] http://www.ldraw.org/#TOP
  [6] http://www.ldraw.org/#TOP
  [7] http://www.brickshelf.com/gallery/jediagh/ldraw-dev/tutorials/tutorial-files/blocks.ldr
  [8] http://www.brickshelf.com/gallery/jediagh/ldraw-dev/tutorials/tutorial-files/blocks.ldr
  [9] http://www.ldraw.org//Article421.html
  [10] http://www.ldraw.org//Article7.html