Problem
This article describes how to change the units of a .IGES file prior to importing it into SOLIDWORKS.
The imported units of the IGES files are written into the file at the time it was created, but sometimes the units are incorrect. If the expected file dimensions are off by a factor of 10, 100, or 25.4, the most likely reason is that the file was saved with the wrong units. Sometimes, scaling the part is the simplest solution, but there is a method to fixing the unit type within the file.
Solution
- Open a text editor such as Notepad or Notepad++. Note: The solution example will be using Notepad++.
- Right-click the IGES file to select the right-click option to open the file with the text editor or change the file type to .txt to open it directly in the text editor.

- Once open, the first 4-6 lines store the file properties of the IGES file. Usually between lines 3 and 4, there are two entries that contain the unit data. The indicator to look for is the string that contains a number, capital H, then the units; in the example below, it is 2HIN.

- The string before that is going to be a single integer. The first number is the numerical code for the unit, while the second number is the unit type. Both numbers will need to be changed to change the unit type.
- Once both of these strings have been located, the table below shows the different units that can be used to replace them within SOLIDWORKS
| Unit | Integer Entry | Unit Entry |
| Inch | 1 | 2HIN or 4HINCH |
| Millimeter | 2 | 2HMM |
| Feet | 4 | 2HFT |
| Meter | 6 | 1HM |
| Mils | 8 | 3HMIL |
| Microns | 9 | 2HUM |
| Centimeters | 10 | 2HCM |
| Microinches | 11 | 3HUIN |
Note: There are missing integer entries and omitted units. Due to the limitations of the SOLIDWORKS bounding box (1 km x 1 km), units such as miles and kilometers were left out. These units may be a possible output unit type in other programs, but they are not the output units of SOLIDWORKS.
- Change the value of the strings to change the units. In this example below, the units are changed from Inches to Feet by changing "1,2HIN" to "4,2HIN"
- Save the file and change the file extension back to .IGES if it was changed
- Open the file within SOLIDWORKS, and the scale of the imported model will be correct
For additional support, existing customers can submit a ticket or new customers can contact Hawk Ridge Systems.
Comments
Article is closed for comments.