This article describes how to change the units of a .IGES file prior to importing it into SOLIDWORKS.
A common file type to send parts and assemblies between other programs or different versions of SOLIDWORKS are .IGES files. 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 you realize that your 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. To do this, you will need a text editor. Notepad is usually installed by default on the computer, but Notepad++ is a free program that is much better at reading larger .IGES Files. In the example, I am using Notepad++
First, open the file using the text editor. You can either do this directly with the .IGES file...
or rename the file type to .txt.
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 you have located these strings, the table table shows the different units that an 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.
In this example, I’ve changed the units from Inches to Feet.
Once you have changed the units, save the file and open it within SOLIDWORKS and the scale of your imported model will be correct
If you have any questions regarding the information above, please contact Hawk Ridge Systems Technical Support at 1-877-266-4469 (US), 1-866-587-6803 (CAN), or support@hawkridgesys.com.
Comments
Please sign in to leave a comment.