CAD: Insert and units

type: note | domain: technology | topic: cad | lang: en | pub: 2019-06-12

You add an external drawing and suddenly the scale is no longer correct. It is a problem that everyone sometimes encounters. How do you solve that? This article explains the consequences of various unit settings. Do you draw in inches? Or mm? Or unitless? And how are "INSUNITS", "INSUNITSDEFSOURCE" and "INSUNITSDEFTARGET" set? Do you find it confusing? Me too. Let's examine it.

It is a somewhat longer article because it is discussed in depth. It is important that you remember the final conclusions, so that you can solve scale problems quickly in the future.

INSUNITS

"INSUNITS" or insertion units is a value that is stored in the drawing. In this example we use some values:

Value Units
0 No units
1 Inches
4 Millimeters
6 Meters

Remember that you work in a drawing that itself has an INSUNITS value, while if you insert a block in that drawing, that block may very well have a different INSUNITS value. That is where the problems arise because your CAD program will try to apply a scale factor that does not always seem logical.

INSUNITSDEFSOURCE and INSUNITSDEFTARGET

The value of INSUNITS is stored in the drawing itself. The values ​​of "INSUNITSDEFSOURCE" and "INSUNITSDEFTARGET" are stored in the registry and are therefore the same for every drawing that is opened.

But what do those values ​​do?

INSUNITSDEFTARGET sets the value of the drawing units of the destination if INSUNITS is set to 0.

INSUNITSDEFSOURCE sets the value of the drawing units of the source if INSUNITS is set to 0.

Beautiful! Does that make us wiser? A little. It is time for an experiment. We have blocks (drawings) with different values ​​for INSUNITS, we have values ​​for INSUNITSDEFSOURCE and INSUNITSDEFTARGET and we insert the blocks in a drawing that itself also has a value for INSUNITS. We can put that in a table.

To keep things organized, abbreviations are used:

IUB = INSUNITS of Block
IUS = INSUNITSDEFSOURCE
IUT = INSUNITSDEFTARGET
IUD = INSUNITS of Drawing

Inserting blocks with INSUNITS is 0

We are going to insert blocks that themselves have INSUNITS 0, no units, …

IUB- IUS- IUT- IUD- Result
0 6 6 0 No scaling
0 6 4 0 Assumed is m (meters) as source and mm (millimeters) as target. Inserted block is scaled 1*1000.
0 0 4 0 Assumed target is mm. No scaling.
0 0 4 6 No scaling.
0 4 0 6 Assumed is mm as source and m as target because IUD 6 overrules IUT. Inserted block is scaled 1/1000

Conclusions for blocks with INSUNITS is 0

Inserting blocks with INSUNITS other than 0

We are going to insert blocks that themselves do not have 0 as the value of INSUNITS …

IUB- IUS- IUT- IUD- Result
4 6 6 0 INSUNITS of Block is mm, overruling INSUNITSDEFSOURCE. INSUNITSDEFTARGET (m) is used because INSUNITS of drawing is 0. So the inserted block is scaled 1/1000
6 0 1 4 INSUNITS of Block is 6 (m), not 0, so overruling INSUNITSDEFSOURCE. INSUNITSDEFTARGET (inches) is not used because INSUNITS of drawing is not 0 and set to 4(mm). So the inserted block is scaled 1*1000.

Conclusions for blocks with INSUNITS other than 0

How does copy and paste work?

BricsCAD uses this principle to determine the scale factor also when copying and pasting. Also consider commands such as COPYBASE (ctrl-shift-c) and PASTEBLOCK (ctrl-shift-v). To the best of our knowledge: AutoCAD does not support the calculation of the scale factor, you have to do that yourself.

Final conclusions

For the automatic calculation of scale factors when inserting blocks and, exclusively with BricsCAD, when pasting blocks (ctrl-shift-v) or objects (ctrl-v), the following rules are used: