Scenario: Some of your files were created in another country. The units are set to Architectural when you received the files. All objects’ LTSCALEs are set to 1. Some layers in both files use the HIDDEN linetype. You referenced these files to the files created and worked on in the US and experience the following problems:
For AutoCAD 2005 or earlier:
- No matter what LTSCALE you set either lines from the US files or lines from the foreign files do not scale correctly.
For AutoCAD 2006 or later:
- No matter what LTSCALE you set, either lines from the US files or lines from the foreign files do not scale correctly.
- When you reference foreign file in AutoCAD 2006 or newer, in addition to the problems with the LTSCALE, the whole foreign XREF file doesn’t scale correctly and is not located in the right place even though you attached it with the scale=1 and insertion point at 0,0,0.
Here is what happened and how to correct this.
There are several variables in AutoCAD that control units.
MEASUREINIT (0 English; 1 Metric) sets the initial drawing units as English or metric. MEASUREINIT controls which units, hatch pattern and linetype definition files a new drawing uses if not started from a particular template. MEASUREINIT is saved in the registry and the original value is determined by the geographic location of the installation.
MEASUREMENT is stored in the drawing and always overrides the MEASUREINIT setting.
When the foreign file was created, it took the local (metric) value of Measureinit and saved it in the file as the value for MEASUREMENT. At that time the operator may have changed the units to Architectural, but did not change other unit variables. In the course of his work, the metric linetype definition for HIDDEN line from the ACADISO.lin was loaded and used in the drawing.
The US drawing was started with MEASUREMENT set for English units and HIDDEN line definition from ACAD.lin (English).
The linetype names are identical in ACAD.lin and ACADISO.lin, but definitions are different. After the definitions are loaded into the file, it is not clear what .lin file they came from.
To correct the linetype issue you need to re-load linetype definitions from the ACAD.lin file into the foreign file. While you are at it, set the MEASUREMENT=0.
The second problem is illustrated by the units dialog boxes
For AutoCAD 2005 and earlier it says:
Units to scale drag-and-drop content.
For AutoCAD 2006 and later it says:
Units to scale inserted content.
These values are controlled by the INSUNITS variable, which is saved in the drawing. The foreign drawing had it set to something other than inches, but the file did not have any symptoms until AutoCAD2006. Before 2006 this variable only affected drag-and-drop operation.
Possible values of INSUNITS are: 0-Unspecified (unitless); 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-decameters; 16-Hectometers; 17-Gigameters; 18-Astronomical Units; 19-Light Years; 20-Parsecs
The only remaining question is what will happen when INSUNITS in either file is set to 0? (unitless).This situation is controlled by INSUNITSDEFSOURCE and INSUNITSDEFTARGET. They can be set in the Options-> User Preferences. The values are similar to INSUNITS.
The following script will fix all unit related the problems
-UNITS 4 64 1 0 0 n
LINETYPE LOAD * ACAD.LIN
-PURGE LT *ISO* N
Lines 1-3 simply set unit variables. Line 4 forces the linetype command to work in text mode without issuing prompts for user intervention (it needs EXPERT 3 mode for that, which I reset back to default EXPERT 0 after I am done with the LINETYPE command). After loading all linetypes from ACAD.lin, I purge only the linetypes with a name containing “ISO”. (I could have purged all unused linetypes or even all unused definitions.)