KB: How-To determine the scale units of a DXF-DWG file

Altium Designer Altium Designer
Starting in version: 18 Up to Current
The PCB import of a provided DXF/DWG file resulted in the wrong PCB document primitive dimensions (due to the scaling settings used). How can the provided DXF/DWG file scale units be determined in order to set the proper Import from AutoCAD scale value?

Solution Details

Issue Description, Brief
A DXF/DWG file was imported to a PCB document, and the resultant PCB primitives were not the correct/expected size/dimensions. This issue can occur when the wrong Scale (factor) has been selected in the Import from AutoCAD settings dialog. A screen capture of the Import from AutoCAD dialog with some arbitrary settings follows.

01 Import From AutoCAD Scale Settings.png

 

 

Solution
Follow the steps below to determine the DXF/DWG file's insertion scale units (INSUNITS) value, to allow for a better understanding of what Scale factor should be used for the DXF/DWG file import:
1. Open a copy of the DXF/DWG file in a text-editor, for example Windows Notepad.
2. Use the text-editor's search function to search for the text string INSUNITS, for example Windows Notepad main menu command Edit >> Find, or (commonly used) shortcut Ctrl+F, in the search function field type INSUNITS and press keyboard Enter.
3. The INSUNITS definition will start with the line $INSUNITS, and follow with three lines of text, "70" followed by the INSUNITS "Value" and ended with "9", read off the INSUNITS "Value", a screen capture from an example file follows.

DXF uinit.jpg
4. Look up the defined values for the INSUNITS system variable. Commonly (expected) values for a PCB board outline might include: 1 Inches; or, 4 Millimeters; or, 5 Centimeters; or, 6 Meters; or, 9 Mils. A full list of defined values can be obtained from the Autodesk website page for AutoCAD 2024 INSUNITS (System Variable) if required:
https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-A58A87BB-482B-4042-A00A-EEF55A2B4FD8
5. Redo the PCB document DXF/DWG file import, and select the appropriate Scale according to the determined INSUNITS insertion scale units value. Note: a calculated Size value will be generated based upon the set of included DXF/DWG file objects, and depending on the full set of objects in the DXF/DWG file - the Size should be near to (slightly larger than) your expected Board Outline Length x Width value.

02 Import From AutoCAD Scale Size Approximation.png

 

 

Additional References

DXF/DWG import is often used for the import of MCAD drawing data in order to subsequently define the PCB document Board Outline (using the define board shape from selected objects command). However, there are two other methods which can be considered for the definition of a board outline: defining the board shape from a 3D Body (STEP or other supported 3D model format); or, defining the board outline in your MCAD tool and synchronizing with Altuim Designer using MCAD CoDesigner.

Defining the Board Shape from a 3D Body
This is largely analogous with the definition of a board outline using DXF/DWG import, except that the import is done using a supported 3D model format. This method is well oriented to the single (one-way) transfer of data.
https://www.altium.com/documentation/altium-designer/defining-board-shape#defining-the-board-shape-from-a-3d-body

Altium MCAD CoDesigner
This is a more advanced solution. Altium MCAD CoDesigner allows for the continued bidirectional synchronization of your design data between the ECAD and MCAD domains. There is somewhat more setup required, but the payoff is that MCAD CoDesigner supports features beyond the simple one way definition (transfer) of a board outline. Highly used ECAD-MCAD features include the the structuring of enclosure information (component/enclosure clearances) as well as component placement (positioning/repositioning).
https://www.altium.com/documentation/altium-codesigner

Introduction to Altium MCAD CoDesigner
https://my.altium.com/altium-designer/getting-started/introduction-altium-mcad-codesigner

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.