Tutorial: Setting up LDraw to Create Virtual NXT Robots

I used the free LDraw system of tools to create most of the images and all of the building instructions in the ULMN Inventor’s Guide. If you’re interested in learning how to create virtual NXT robots as well, the following tutorial shows how to set up LDraw on your computer and customize it specifically for NXT parts.

Note that the most commonly used LDraw tool for creating models is the program MLCad (see image below). To facilitate the process of finding and selecting parts from the NXT set within MLCad, I’ve customized a “favorites” file used by MLCad, listing all the pieces in the retail version of the NXT set. The pieces are listed in the same order as found in Appendix A (LEGO MINDSTORMS NXT Piece Library) of the ULMN Inventor’s Guide. You’ll use this customized file in the tutorial.


Setting Up LDraw to Create Virtual NXT Models (for Windows users)

Note: If you already have LDraw and MLCad installed, skip to step 2.

Step 1: Download the LDraw Tools Installer from the LDraw website. Once downloaded, open the file and follow the instructions. You can choose “Basic,” “Intermediate,” or “Advanced” installation. For this tutorial, only “Basic” is necessary (which includes the installation of MLCad).

Step 2: Download the Unofficial Part Files from the LDraw website. Although you don’t need all of the unofficial files, you’re going to download everything at once to make it easy. You’ll download a single zipped folder, and when you unzip the folder, make sure to extract the files to your C:\LDraw directory. If you’re using Windows XP, you would unzip or extract the folder’s contents by right-clicking the zipped folder and selecting “Extract All…”

Step 3: Go to http://www.philohome.com/nxtldraw/nxtldraw.htm and download the 24 bits stone color version of the LDraw NXT parts. Even though you already got these parts when you downloaded the unofficial part files in step 2, you want to use the modified color settings of Philo. After downloading the zipped folder, extract or unzip the folder’s contents to your C:\LDraw directory. You’ll be asked if you want to overwrite the existing files–select “Yes” or “Yes to all.”

Step 4: Download the customized MLC_Favorites file by right-clicking on this link and saving the file to your C:\LDraw\Apps\MLCad directory. Since you are replacing an existing favorites files, you’ll be asked if you want to overwrite it–select “Yes.” Note: If you have already added favorite pieces within MLCad and want to keep them, you can copy and paste the contents of my file into your existing MLC_Favorites file.

Step 5: Run MLCad and selecte File –> Scan Parts from the menu bar. MLCad might take a little while as it scans for new parts, and when it’s finished, it should ask you if you want to create a new Parts.lst file–select “Yes.” Finally, click “Favorites” from the list on the mid-left of MLCad. All the NXT set parts should appear below (see following image). Have fun! The best place to get more information about using LDraw is the LDraw.org website.


Hints and Tips:

1. Many of the pieces in the NXT set use the new “stone” colors (i.e., light stone gray, medium stone gray, and dark stone gray). When you want to change the color of a piece—the default is black—enter one of the following values as a color number in MLCad:

Light stone gray: 0x02E5E4DE

Medium stone gray: 0x02A3A2A4

Dark stone gray: 0x02635F61

2. For now, the best way to add electrical cables is to use the “RJ12 Cable End” part. This part is simply the end of an NXT cable and signifies a complete cable (and prevents your model from looking messy!).

3. The turntable in the NXT set exists as two parts in LDraw (the “top” and the “base”). Simply put the parts together in the workspace in order to achieve a complete turntable.

5 Responses to “Tutorial: Setting up LDraw to Create Virtual NXT Robots”

  1. Kyle says:

    Great guide! Thanks!

  2. David Perdue says:


    I’m glad you found the tutorial useful. As always, suggestions for improving the tutorial are welcome.



  3. mike says:

    I am wondering if you have any suggestions on getting and compiling the source for the LSynth with NXT cables?

  4. David Perdue says:


    I have not personally experimented with using LSynth to create NXT cables. However, I would suggest using the following forums to get more information:




    – David J. Perdue

  5. Jordan Gray says:

    This is really helpful! I will definitely use this a lot. Thanks so much!

    – Jordan