by Ray C. Freeman III, LEGO CAD designer
Creating Your Own Animations
Making Tricky Connections
There are a number of ways to use LEGO CAD with other software. Which method to use depends largely upon the capabilities of the other software. To put it most simply, you can either import 3D models or images into other software. These are two very different things, at very opposite ends of the range of graphic possibilities.
Images of LEGO CAD models can be imported into other software in one of two ways. Both methods freeze the contents of the Model Window as an image only, no 3D data is transferred. The first method is to Save as Bitmap from the File menu in LEGO CAD, and then Open, Import, or Place it in the target software. The other software must have the capability of dealing with .BMP files in Windows or PIC files on a Macintosh. This is a good way to get LEGO CAD images into image processing or painting software such as Adobe Photoshop, Windows Paint, MacPaint, some page layout software like Adobe Freehand, and other software which accepts image files. Other software may require that you first convert the image file to another format before you can import it. In some cases, additional file conversion software may be required.
Images to be used on websites, for instance, should be converted to .JPG or .GIF format. .GIF is better for the types of images created by LEGO CAD. .JPG format was developed for compression of photos, and doesn't work well for CAD images, introducing a 'halo' of random pixels around the image and distortions in lines edges, and colors. The type of compression used in .GIF format files is very efficient for LEGO CAD images, and introduces none of the flaws created by .JPG compression. Notice the two images to the left. The image on the left is a .GIF, while the one on the right is a .JPG. It took maximum compression to create a .JPG file as small as the .GIF. To achieve the same level of quality with a .JPG yeilded a file two and a half times the size of the .GIF.
Another way to get LEGO CAD images into other software is through the System Clipboard. Use the Copy to Clipboard command on the Edit menu to copy the contents of the Model Window to the clipboard as an image. Switch to the other program and Paste the image into your document. This is a good way to import LEGO CAD images into applications such as Microsoft Word and Excel, or other software that supports pasting of images from the system clipboard.
To bring true 3D data from LEGO CAD into another program requires the use of the LEGO Exchange program. This program converts LEGO CAD model files to formats which may be read by other software which supports true 3D data.
Two file types may be created with LEGO Exchange. ASC format is for use with Autodesk 3D Studio Releases 3 and 4, and .DXF format is for use with all versions of AutoCAD, Kinetix 3D Studio MAX, and all other 3D applications which support .DXF format.
To create a .DXF or .ASC file, run LEGO Exchange and click the button for the file type you need. Select the model you want to convert, then a name for the file you want to create. If you are creating an .ASC file on a PC, there will be an additional dialog box which allows you to set up a Spotlight and a Camera. The status animation will play until the conversion is complete. You can repeat this process to create as many files as you like.
To load a .ASC file into 3D Studio, first make sure that you have copied the file LEGOCAD.MLI from your LEGOCAD directory into 3D Studio's MATLIBS directory. In 3D Studio, before loading the .ASC file, you must load this materials library by choosing Surface, then Material..., then Get Library. Select the file LEGOCAD.MLI and press OK. Now, select Load from the File menu, click the *.ASC button, and locate the file you want to load using the drive buttons and the director and filename fields, then press OK. Be patient, because .ASC file take a while to load. Although you can also load .DXF files into 3D Studio, .ASC is generally the preferred method, because each LEGO CAD element is imported as a 3D Studio Object, and materials are applied automatically.
To load .DXF files into any version of AutoCAD (for Release 14, see additional Release 14 procedures below first), use the DXFIN command at the prompt, or select Open from the File menu, and click on DXF. Type or select the file name, and press Enter or the OK button, depending on which method you are using. A layer will be created for each LEGO CAD color, and 3DFACE entities describing the LEGO CAD elements placed on the layer appropriate to their color.
If you are importing LEGO Exchange .DXF files into AutoCAD Release 14, you will first have to edit the .DXF file to overcome a problem importing layers into Release 14. Unfortunately R14 was released after LEGO CAD, so LEGO Exchange .DXF files were not tested in R14, and will not load properly. You can solve this problem by using a text editor to remove the layer table from the .DXF file. Simply open the file in any text editor capable of editing pure ASCII text, such as Windows Write or even Microsoft WORD. Generally, .DXF files are too large to load into Windows Notepad. Delete the first 84 lines of the file, leaving the following as the new first few lines of the file:
Even though it they may not show up here, it is standard form to include two spaces in front of each zero show above. Now, save the file. If you are given a choice, choose Pure Text or ASCII text, and keep the .DXF extension. The file will now load into AutoCAD Release 14 using the procedures described above.
Alternately, Autodesk suggests adding the following lines to your file, rather than deleting the first 84 lines:
Again, correct syntax would include two spaces in front of every other line (the ones with the freestanding digits), even though they may not show here. Save the file as directed above, and it will load into Release 14.
.DXF files may also be imported into a wide variety of other programs. Each has its own method for importing .DXF files, usually involving a Load, Open, or Import command. LEGO Exchange .DXF files may not load into some programs which import only 2D .DXF files.
CyberToys, Inc. | The White House Is Our House | LEGO CAD | The CyberToy | Design Thingy | Home Page
©1998 CyberToys, Inc. · 1932 First Avenue, Suite 928 · Seattle, Washington 98101 · (206) 269-0579 fax: 728-2341
This information may be reprinted so long as authorship is credited to Ray C. Freeman III, with the CyberToys, Inc. copyright notice attached.