Holly-Wood.it  
    Brick 1 x 3
Brick 2 x 2 Corner    
  Brick 1 x 1  
[ english ] deutsch ] italiano ]
 
  Home > MLCad > Tutorial: Customizing MLCad Last update: 31.10.2014  
    Brick 1x2  
 
 

Tutorial to customize MLCad a bit through the MLCad.ini file

 
 
   
       
  The MLCad.ini file tells the minifig generator in MLCad and LeoCAD as well as Bricksmith (the counterpart LDraw editor in the MAC world) which parts are available. In addition, the file defines the order of scanned folders during the launch of MLCad, which comes handy when dealing with unofficial LDraw parts and finally it rules the interaction with LSynth. If your installation doesn't come with a MLCad.ini file download it from the MLCad.ini tutorial page.

Table of Content

Minifigur generator
Scan order
LSynth
 
   
  NOTE! A french translation of this tutorial can be found at J.C. Tchang's website: http://jc-tchang.philohome.com/manuel/mlcad_ini.htm.
  Brick 1x6
  Screentshot Editor
   
  The MLCad.ini file is a simple text file, editable in an editor or a word-processing program, but since it is stored in the Program folder the text editor has to run as administrator with full elevated rights and privileges on Windows Vista or higher. Right click on the program's shortcut and click on Run as administrator. If prompted by UAC, then click on Yes to apply permission to allow the program to run with full permission as an administrator.

NOTE: If you are doing this is while logged in as standard user instead of an administrator, then you will need to provide the administrator's password before the program will run as administrator.

The MLCad.ini is grouped in three sections:
 
     
  Minifigure generator
Scan order
LSynth
 
     
 

Minifigure generator

 
     
  This sections gives you full power over the selectable elements, but this also means that the chart has to be updated every time LDraw releases a new parts update containing minifig parts. You can add the new code by yourself, following the instruction below or just download the file from here, since Holly-Wood.it is the official maintainer of the .ini file.In case you wanna add unofficial or custom minifig parts there is one block per minifig element: Hats, Head, Body,... The block names are mandatory - if they are missing or wrong MLCad uses an internal default instead, which is different from the content in the file! Each element line has the following format:

"<Display name>" "<DAT/LDR file name>" <Flags> <Matrix> <Offset>
 
     
 
<Display name> The name of the element as it is displayed in the element list
<DAT/LDR file name> The file name of the element or "" for hidden element
<Flags> Always 0 reserved for future use
<Matrix> A rotation matrix a11 a12 a13 ... a33 for optimal appearance at 0 degree rotation angle
<Offset> The offset of the part to be in place
 
     
  In the example I'm gonna add one of the torso you can find on the page with the custom parts I've designed. It takes for grandet that you have already read the Easy rotation tutorial or checked out the scan order tutorial below and know how to install custom parts.  
     
  Screentshot Minifig Generator 1
   
  1. Open the MLCad.ini file (you will find it in MLCad's root folder) in an editor or a word processing program and scroll down towards the end of the document 'til you come to the [BODY] section which administers the torsos.  
  2. Insert the data according to the format above. For the Boobsp2.dat it would look like this:

"Boobs with Bra Pattern" "Boobsp2.dat" 0 1 0 0 0 1 0 0 0 1 0 0 0

In case your part doesn't require special rotation or positioning values like minifig accessories it is best to copy'n'paste an existing entry and substitute just the naming and part number. It is however good advice to flag custom inserts properly. MLCad encourages this and interprets lines beginning with ";" as comments, while empty lines are ignored.
 
       
  Screentshot Minifig Generator 2
   
  3. Save the file. Opening the Minifig Generator the new part will be immediately available.  
       
    NOTE! You might keep the editor open after you have saved the new content. In fact MLCad deals just fine with an open .ini file. This behaviour is especially welcome when refineing the matrix by trail'n'error. All you have to do is:
  • Closing the Minifig Generator by hitting Cancel.
  • Make your changes to the MLCad.ini file and save it.
  • Once you fire up the generator again the new values will apply.
top  
  Brick 1x6  
 

Scan order

 
     
 

This feature has been thought to include unofficial and custom parts into MLCad, without the need to mix them with the official LDraw parts in the \PARTS and \P folders. DAT files found in the scan will be included in the parts library and - depending on the flag - show up in the parts tree library and parts preview window.

A detailed explanation how this all works can be found in: Adding unofficial LDraw parts to MLCad.

top  
     
 

LSynth

 
     
  The sections tells MLCad the absolute path to LSynth and defines the available synthesis:

%PATH = <path name>

Example:
%PATH = "C:\Programs\MLCad\LSynth"

NOTE! The definition points to the path containing the bin\ folder and NOT the program lsynthcp - the console based synthesizer that reads in the DAT file and writes out a new DAT file with the synthesized parts. The quotes are important in case your path contains blanks.

Following the path the section lists the available synthesis types. Since all synthesis are already listed you don't have to edit this portion. I'll show you the format just for completeness:

<TITLE> = <COMMAND STRING>
 
     
 
TITLE The name displayed in the combo box of the "Add LSynth Command" dialog
COMMAND STRING The command to be added to the project. Please refer to LSynth's documentation for a deeper insight
 
     
  Example:
;Axel, cable hose and string types LSynth knows about:
FIBER_OPTIC_CABLE = SYNTH BEGIN FIBER_OPTIC_CABLE 16
FLEXIBLE_AXLE = SYNTH BEGIN FLEXIBLE_AXLE 16
;Band, belt and tread types LSynth knows about:
TECHNIC_TREAD = SYNTH BEGIN TECHNIC_TREAD
Tangent Statement: INSIDE = SYNTH INSIDE

NOTE! Regardless of the order of the statements in the .ini file the combo box will sort and list the synthesis types in alphabetical order.

You may have also look at the LSynth/MLCad Tutorial for additional information.
top  
     
  LEg GOdt!  
     
 
  It's said that the "Donate" buttons on the internet are dead. If you feel that this tutorial has added some value to your LDraw experience, show that the above statement is not true - even just one Dollar or Euro will do. Many thanks in advanced!
 
  Brick 2x4
All content is provided as is, with no warranty stated or implied regarding the quality or accuracy of any content on or off this site.
LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this site.