LuaCAD Help

Drawing units and display units

All plug-ins calculate, store and compare internally in millimeters. Units matter in only two places:

Both follow one default for all plug-ins and all drawings.

Choosing the drawing units

Goal: set the units in which the plug-ins insert new parts and the fields show dimensions.

The Drawing units dialog box from the LuaCAD settings: Automatic (1), Always: mm, cm, dm, m (2), the line "Units of the drawing …" with source, factor and the unit of the fields – here a drawing in millimeters (3), OK (4)
The Drawing units dialog box from the LuaCAD settings: Automatic (1), Always: mm, cm, dm, m (2), the line "Units of the drawing …" with source, factor and the unit of the fields – here a drawing in millimeters (3), OK (4)
  1. Open the dialog box: ribbon › LuaCAD tab › Info ribbon panel › LuaCAD settings › Drawing units … – or in the gear menu of a plug-in (Piping 3D: gear menu › Settings › Drawing units …). It is the same dialog box.
  2. Choose Automatic (each drawing brings its own units) or Always: mm, cm, dm or m (these units for every drawing).
  3. The line below tells you what the choice means for the open drawing: where the units come from, the factor for new parts, and the units of lengths and floor-to-floor heights in the fields. Example in a drawing in millimeters: "Units of the drawing: millimeters. New parts go into the drawing in mm (factor 1). Fields: lengths in mm, floor-to-floor heights in m." If the drawing has no units, the line says what LuaCAD recognizes from the size of the plan ("The drawing has no units – recognized from the size of the plan: meters") or only suggests (then the command line asks once at the first insert).
  4. OK – the choice applies at once in all plug-ins. Open palettes switch their fields; the value stays, only the number is converted.
ChoiceWhat happens
AutomaticEach drawing sets its own units – through its units in GstarCAD (UNITS command, "insertion scale"). If it has none, LuaCAD estimates them from the size of the plan (see below).
Always: mm, cm, dm, mThese units for every drawing, whatever the drawing says. Useful when plans arrive without units or with wrong ones.

Where "Automatic" takes the units from:

Video coming soon: Choosing the drawing units

How fields show dimensions

Every field shows its unit next to it. Which unit depends on the kind of value:

Kind of valuemm drawingcm drawingm drawingExample
Lengths, distances, elevationsmmcmmelevation 2400 mm shows as 240 (cm) or 2.4 (m)
Floor-to-floor heights, level elevationsmcmmfloor-to-floor height 3 m shows as 3.000 or 300.0 (cm)
Nominal size (DN), insulation thickness, ventilation duct and pipe sizes, size in Piping 2Dalways mmalways mmalways mmDN 20, insulation 20 mm, duct 400 × 200
Slope%%%1.5 %
Angle, rotation°°°45°

Calculating in fields

You may type a calculation in any number or dimension field; when you leave the field, the result appears.

CharacterMeaningExample
+ -plus, minus"600+400" → 1000
* xtimes"2*450" → 900
/ :divided by"3000/4" → 750
( )parentheses"(1200-2*50)/2" → 550

Comma and period both count as the decimal separator. A suffix goes at the end of the whole calculation: "600+400mm". Fields for names, abbreviations and article numbers do not calculate – "12-34" stays as it is.

Values in the command line

What you type in the command line – coordinates, points, a length at the cursor – applies in drawing units, as with every GstarCAD command, not in the display units of a field. In a drawing in meters "@3,0" is 3 m to the right, in a drawing in mm it is 3 mm.

If the drawing is not in mm, the command line names the units and the factor once per drawing at the first insertion: "Drawing in m: dimensions are in m, parts come into the drawing with factor 0.001."

The project units

In a project the drawings are attached to each other as xrefs without a scale – that is only right when all have the same units. So every project has one unit:

Example: a pipe in an architect's plan in meters

Goal: insert a DN 20 pipe of 3 m in a plan drawn in meters – with correct dimensions.

Picture coming soonResult in a plan in meters: the command line with "Drawing in m … factor 0.001" (1), the DN 20 pipe along the wall (2), measured 3 units = 3 m (3), in the palette the elevation 2.4 m (4)
  1. Open the plan. It has the units meters (the GstarCAD UNITS command shows "Meters").
  2. LuaCAD tab › Info › LuaCAD settings › Drawing units …: Automatic is selected; the line says "Units of the drawing: meters", that new parts come in m with factor 0.001 and that the fields show lengths and floor-to-floor heights in m – OK.
  3. Open Piping 3D, Pipe page: DN 20, elevation 2.4 (m), insulation 20 mm.
  4. Insert. The command line says once that the drawing is in m and parts come in with factor 0.001.
  5. Click the start at the wall, type "@3,0", Enter; another Enter ends the run.
  6. Generate 3D. Measured with the GstarCAD DIST command, the pipe is 3 units long – 3 m; the pipe has the diameter of DN 20, the insulation is 20 mm.
Video coming soon: A pipe in a plan in meters