Automatic Scaling of Blocks, Images or XREFs
When Autodesk released AutoCAD 2007 I noticed that when I inserted a block or XREF it would sometimes scale up or down in a way I didn’t expect. After a little digging in the help file I found these system variables: INSUNITS, INSUNITSDEFSOURCE, & INSUNITSDEFTARGET.
According to the help file, INSUNITS “specifies a drawing-units value for automatic scaling of blocks, images, or xrefs inserted or attached to a drawing.” If you set INSUNITS to 0 (zero) you can use INSUNITSDEFSOURCE and INSUNITSDEFTARGET to control automatic scaling of blocks, images, or XREFs.
Values for INSUNITS, INSUNITSDEFSOURCE, & INSUNITSDEFTARGET:
| 0 | Unspecified (No units) |
| 1 | Inches |
| 2 | Feet |
| 3 | Miles |
| 4 | Millimeters |
| 5 | Centimeters |
| 6 | Meters |
| 7 | Kilometers |
| 8 | Microinches |
| 9 | Mils |
| 10 | Yards |
| 11 | Angstroms |
| 12 | Nanometers |
| 13 | Microns |
| 14 | Decimeters |
| 15 | Dekameters |
| 16 | Hectometers |
| 17 | Gigameters |
| 18 | Astronomical Units |
| 19 | Light Years |
| 20 | Parsecs |
For example:
I made a block that contained a single line, 1-unit long. In a blank drawing I set INSUNITS to 0, INSUNITSDEFTARGET to 1 (inches), and INSUNITSDEFSOURCE to 3 (miles). Setting INSUNITS to 0 made it an unspecified value so that INSUNITSDEFTARGET and INSUNITSDEFSOURCE would take precedence. When I inserted the block into the blank drawing, I made sure the scale was set to 1 uniformly (X, Y, & Z were all set to 1). Then I ran a DISTANCE on the line and it measured 63360 units (63360 inches = 1 mile).
When I set INSUNITSDEFTARGET to 1, I told AutoCAD that any block, image, or XREF that is inserted into the current drawing (target drawing) to be measured in inches. When I set INSUNITSDEFSOURCE to 3, I told AutoCAD to treat all blocks, images or XREFs (source drawings) that are inserted into the current drawing as if they were drawn in miles. AutoCAD then does a conversion during insertion.
NOTE: According to the help file, automatic scaling does not happen when the block is annotative.
Scenic Shop’s blog post entitled AutoCAD Imperial & Metric Conversions has some more good information on this topic. Thanks for this Matt!










This isn’t just a shameless plug, but a post I wrote a while ago briefly touches on this. The post was more about drafting & dimensioning in mixed units (e.g. inches & millimeters) though this fleshes it out nicely. I’ll throw a link to this on my blog. Click on my name if you want to read the article.)
Matt,
No problem. I like what you wrote. In fact I will put a link in this post to yours.
Automatic Scaling of Blocks, Images or XREFs…
You’ve been kicked (a good thing) - Trackback from CadKicks.com…