SolidPractices: Working with 2D Imported Data

Revision History
Rev #DateDescription
1.0Jan 2021Document created.
1.2Apr 2023Document aligned to SOLIDWORKS 2023 SP2

Note

All SolidPractices are written as guidelines. It is a strong recommendation to use these documents only after properly evaluating your requirements. Distribution of this document is limited to Dassault Systèmes SolidWorks employees, VARs, and customers that are on active subscription. You may not post this document on blogs or any internal or external forums without prior written authorization from Dassault Systèmes SolidWorks Corporation.

This document was updated using version SOLIDWORKS 2023 SP02. If you have questions or need assistance in understanding the content, please get in touch with your designated reseller.

Acknowledgments

This document was authored by Go Engineer and reviewed by Dassault Systèmes SolidWorks Corporation.

Preface

Despite the 3D CAD revolution, there is often cause for SOLIDWORKS customers to work with 2D CAD data. Many industries, users, and vendors continue to utilize 2D CAD data as a matter of course for simplicity, file size management, and native compatibility with machinery.

Data import of any kind can be tricky, and 2D data especially so. Styles, best practices, and content vary greatly from firm to firm, and navigating that blindly can cost valuable time. Ensuring customers know how to use the robust suite of tools included with SOLIDWORKS, eDrawings®, and DraftSight® to help minimize translation time while retaining accuracy and design intent.

This SolidPractice document examines use cases and workflows for SOLIDWORKS customers to work as efficiently as possible with 2D CAD data. It also covers how to import and convert 2D designs to 3D parts, validate designs and data, and edit files in their native DXF/DWG format.

Your Feedback Requested

We would like to hear your feedback and suggestions for new topics. After reviewing this document, please take a few minutes to fill out a brief survey. Your feedback will help us create the content that directly addresses your challenges.

Working With 2D Files

When working with multiple vendors and using multiple CAD applications, it is very common to work with 2D files. To facilitate this interoperability, SOLIDWORKS applications can work with 2D DXF and DWG format files in several workflows, depending on the requirements.

Some applications for these file include:

  • Viewing in eDrawings®
  • Editing with DraftSight®
  • Importing into SOLIDWORKS as a drawing
  • Creating a sheet format to match existing CAD drawing standards
  • Viewing in the native format in SOLIDWORKS
  • Migrating important legacy files into SOLIDWORKS as 3D parts

Viewing in eDrawings

Since beginning as a lightweight file format to share SOLIDWORKS files, the eDrawings application has grown into a powerful 2D and 3D design communication tool. eDrawings can open many common native and neutral file formats. For a complete list of supported files, see the “eDrawings functionality matrix” in the SOLIDWORKS online Help.

It is a recommendation to use eDrawings to view and validate DXF and DXG files before translating the files into SOLIDWORKS. The files open quickly with support for 2D and 3D files, layers, and multiple sheets, while keeping the file in the native format. Viewing the files in eDrawings supports taking measurements and adding comments and markups. While you cannot save the markup to the native file format, you can save the file to an eDrawings format file. Alternatively, you can save the markup to a .markup file and include that file with the native file for review.

DraftSight is a comprehensive 2D (3D in DraftSight Premium) CAD application that is useful for editing DWG files. DraftSight has full functionality to make quick edits such has layer modifications, significant changes, data translations, and many other functions not mentioned here. DraftSight is a viable solution for editing DXF and DWG files that does not require the modeling capabilities of SOLIDWORKS, while maintaining the file in the native file format.

For more information about DraftSight, please contact your SOLIDWORKS Value Added Reseller (VAR).

If the objective is to use 2D DXF and DWG files in the SOLIDWORKS application, SOLIDWORKS can readily open these files and covert the native 2D entities to corresponding SOLIDWORKS 2D entities. In addition, SOLIDWORKS supports:

  • Multisheet files
  • Layer names, colors, and line styles
  • Translation of standard blocks to SOLIDWORKS blocks
  • XREFs within AutoCAD® DWG files
  • 3D solid data though translation or 3DInterconnect

To view the full list of supported DXF and DWG data, see the topic “DXF/DWG Import Wizard Overview” the SOLIDWORKS online Help.

With the release of new SOLIDWORKS versions, the supported file versions may receive updates. For the list of supported files and versions, see the topic “Import and Export File Version Information” in the SOLIDWORKS online Help for your installed release.

2D to 2D Import Process – The DXF/DWG Import Wizard

Importing a 2D file begins by going to File > Open and selecting the Autodesk AutoCAD Files (*.dwg; *.dxf) option in the list of available file formats. In the Open dialog box, select the DXF or DWG file you want to import, and click Open to start the DXF/DWG Import wizard.

The

DXF/DWG Import

wizard guides you through the import process and allows choices to import the DXF or DWG file to either a 2D drawing or import the data into a part file.

The Convert to SOLIDWORKS entities option imports the file into a new SOLIDWORKS drawing, and converts the original entities to SOLIDWORKS sketch entities. You can modify these converted entities like any other SOLIDWORKS sketch entity.

SOLIDWORKS supports the layer data contained within the DXF/DWG file. The Drawing Layer Mapping page of the wizard specifies which layers to import, and if they import to the drawing sheet or sheet format.

  1. Creating a custom sheet format

A common request is to create a custom SOLIDWORKS sheet format from an existing DXF or DWG file to maintain the existing drawing standard. To do this, select the Layers selected for sheet format option and choose the layer, or layers that represent the title block, border, and necessary annotations. When you open the resulting drawing, the software applies the layers to the sheet format.

For more information about the Sheet format, see the topic “Customizing Sheet Formats” in the SOLIDWORKS online Help.

  1. DXF/DWG Import Wizard – Document Settings

The Document Settings page contains important settings to ensure success when importing DXF/DWG files. It is important to take care to ensure the use of the correct specifications for document units, scale, and the drawing template.

Deactivating this option specifies to ignore the width adjustment factor specified in the AutoCAD to SOLIDWORKS font-mapping file. For more information, see the section AutoCAD Font Support.
  • Input file properties: The software reads this specification from the imported file. You can modify the specification if necessary. This is an important option to specify correctly and requires an accurate DXF/DWG file. Take care when modifying this option because unnecessary changes to the units result in an incorrect translation.
  • Output file properties: These options control the resulting drawing size in SOLIDWORKS, indicated by the red border. Select the Paper size from the menu or select User Defined and enter a value for the Width and Height. Custom drawing templates are available to use by selecting the template from the Document template menu or by selecting Browse to open a custom location.
  • Drawing sheet scale: Like the Input file properties option, this option comes from the imported file. However, you can modify the values. Changing this scale modifies only the imported entities and not the dimensions. This can likely lead to a situation where the entity length and the dimension do not match.
  • Geometry positioning: This option is used to locate the imported DXG/DWG file within the selected SOLIDWORKS paper size. The X and Y position is represented in the lower-left corner of the DXF/DWG file and the lower-left corner of the SOLIDWORKS paper size.
  1. Result of the DXF/DWG conversion
in the SOLIDWORKS online Help.

SOLIDWORKS imports DXF/DWG files into a SOLIDWORKS drawing as sketch entities, lines, arcs, circles, etc. All layers translate into SOLIDWORKS layers and the options are available for modification. The dimensions do not attach to the sketch geometry and you cannot change them. If you attempt to change a dimension, the following message appears:

command (Tools > Dimensions) to attach the sketch geometry. The dimensions are part of the sketch geometry and the value given is based on the geometry to which the dimensions are attached.
  1. Viewing the DXF/DWG native format

SOLIDWORKS supports opening DXF/DWG files without converting the file. This is typically useful for viewing and printing purposes. When opening a DXF/DWG file, select the Embed as a sheet in native DXF/DWG format option in the

DXF/DWG Import

wizard. option establishes a link to the source DXF/DWG file. Changes to the source file are reflected when you open the saved SOLIDWORKS file. When using the native format method, the specifications on the Drawing Layer Mapping page of the wizard are inaccessible because it is not possible to modify the file. The full complement of options is available for modification on the Document Settings page.

Native format support requires installation of the eDrawings software.

2D to 3D Import Process - Workflows for 3D Part Creation

Oftentimes there is a need to convert 2D DXF/DWG files to a 3D SOLIDWORKS part model. In such cases, the recommendation is to convert these files on an as needed basis instead of converting the entire CAD library.

Depending on the complexity, accuracy, and completeness of the DXF/DWG file, this can be a straightforward process or quite involved. This section focuses on importing a 2D file to a part as a sketch and using several SOLIDWORKS features to create a 3D model.

Importing a 2D file begins by going to File > Open and selecting the Autodesk AutoCAD Files (*.dwg; *.dxf) option in the list of available file formats.

The following options are available when importing a DXF/DWG file to a new part:

  • Import to a 2D sketch
  • Import as a reference
  • Import as 3D curves or a model

For information about importing to 3D curves or a model, see section 8)a) - “Import Though the DXF/DWG Import Wizard”.

When importing a DXF/DWG file into a SOLIDWORKS part, the available options behave in the same way described in the previous section for importing to a drawing. Choose the layers that are useful in creating a 3D model. For example, it might not make sense to transfer the border and title block layer as well as notes or other annotations.

The software reads this specification from the imported file. You can modify the specification if necessary. Take care when modifying this option because unnecessary changes to the units result in an incorrect translation.

Add constraints: Activating this option attempts to add sketch relations to the geometry in the translated part. This can result in a very large number of relations that do not capture the design intent accurately. Activating this option may also have a negative impact on performance if the sketch contains a very large number of entities.

Import Dimensions: Activating this option attaches the dimensions in the DXF/DWG file to the translated SOLIDWORKS sketch entities. The resulting dimensions are native SOLIDWORKS smart dimensions that you can modify.

  1. DXF/DWG Import Wizard – Drawing Layer Mapping
page of the wizard has several important options to assist with ensuring that the import file is as complete and error free as possible.

Merge points closer than: This option makes it possible to eliminate gaps that are smaller than the distance specified. Be careful not to make the distance too large because SOLIDWORKS may merge two entities that you do not want to merge.

Merge overlapping entities: Merges overlapping entities (lines, arcs, curves, etc.) into a single entity. There are no adjustments for this option and the entities must completely overlap.

Run Repair Sketch: Automatically starts the Repair Sketch tool on the translated entities within a SOLIDWORKS sketch. If required, you can run the Repair Sketch tool manually from Tools > Sketch Tools > Repair Sketch or by clicking the

CommandManager tab.

Use the Define Sketch Origin option and the Rotate about the origin option to better position the DXF/DWG entities relative to the sketch origin in the SOLIDWORKS sketch. There is no snapping of the sketch origin to the preview of the DXF/DWG file.

Remove Entities: Use this option to edit the DXF/DXG file by removing unnecessary entities before the file translates into SOLIDWORKS.

  1. DXF/DWG Imported to a SOLIDWORKS Sketch

The result of a DXF/DWG import into a SOLIDWORKS part are sketch entities inserted onto the front plane. All SOLIDWORKS features and commands are available for using the imported DXF/DWG sketch information to create a 3D model.

After translating a DXF/DWG file to a part, the 2D to 3D toolbar appears automatically. This toolbar contains tools to guide the process of creating a 3D part.

, Add to Top Sketch, and Add to Right Sketch. This virtually folds the flat DXF/DWG entities around the 3D volume that encompass the part. This begins with the front view, and you can add more views as needed.

The result may look like the following example.

Use the Align Sketch

  1. 3D Feature Creation

After sketch alignment, the next step in the process is to create the base feature by using the Convert to Extrusion command.

command, including end conditions, an option to include draft, create a thin feature, and contour selections.

All standard end conditions are available. You can also use the Depth

, Offset Entities, Trim, Mirror, etc. to complete the sketch.” in the SOLIDWORKS online Help.

Following standard modeling practices, you can add multiple extruded bosses, and use the Convert to Cut

command and has the same end conditions and options.

The

Import as reference

process follows the same steps in the DXF/DWG Import wizard as described previously. The difference is that the translated sketch is locked and therefore not editable.. At this point, it is like any other underdefined sketch.


 

Copy and Paste Into a Sketch

When working with 2D DXF/DWG data, there may be situations where you do not need the entire file in SOLIDWORKS. In such cases, it does not make sense to translate the file by using the DXF/DWG Import wizard. Specific regions of the 2D file are selected in the native application (DraftSight shown here), with a standard selection window, and copied to the clipboard. You can then pasted the selection onto a SOLIDWORKS sketch plane and used for any purpose.

  • Import Though the DXF/DWG Import Wizard
  • When importing a 3D DXF/DWG file through the DXF/DWG Import wizard, there are very few options to specify. This is a more direct process compared to importing a 2D file. This technique is used when the 3D DXF/DWG file requires full translation into SOLIDWORKS and requires that the 3D Interconnect feature is inactive. For more information, see section 8)b) - “Import Using 3D Interconnect.

    The Document Settings page of the import wizard (see next image) contains one option to specify the units of the imported file. The wizard reads the units from the imported file. Give careful consideration before making changes to ensure an accurate sized file in SOLIDWORKS.

    ” in the SOLIDWORKS online Help. is the latest CAD interoperability technology. This technology allows users to work seamlessly with multiple types of third-party native CAD and neutral files.

    Opening 3D DXF/DWG files with 3D Interconnect allows the file to remain in the native format because the files are references and not translated. In SOLIDWORKS, these files maintain an associative link to the native format files.

    3D Interconnect is active by default after installing SOLIDWORKS. You can activate or deactivate 3D Interconnect from Tools > Options > System Options > Import.

    There is no import wizard to guide you through the process when using 3D Interconnect. The process is identical to the example discussed in section 8a - “Import Through the DXF/DWG Import Wizard.” An icon in the FeatureManager® design tree represents the link to the native file.

    Considerations

    You must consider a number of things when importing 2D DXF/DWG files. Because this is a translation from one file format to another, the result is not always perfect. While not a complete list, it is good to be aware of the following common issues.

    Geometry Issues

    The quality of the resulting SOLIDWORKS file depends greatly on the quality of the source DXF/DWG file to import. In this document, the general term of geometry issues describes any number of potential problems in the resulting SOLIDWORKS file.

    Gaps between entities can cause difficulties in SOLIDWORKS when using the sketch for an extruded feature. With gaps present, SOLIDWORKS recognizes the sketch as an open contour and creates a thin feature.

    At first glance, the following imported DXF/DWG file appears to have closed contours in the resulting sketch.

    This option makes it possible to eliminate gaps that are smaller than the distance specified. Be careful not to make the distance too large because SOLIDWORKS may merge two entities that you do not want to merge.

    Merge overlapping entities: Merges overlapping entities (lines, arcs, curves, etc.) into a single entity. There are no adjustments for this option and the entities must completely overlap.

    Use this option to edit the DXF/DXG file by removing unnecessary entities before the file translates into SOLIDWORKS.

    Remove Entities: Use this option to edit the DXF/DXG file by removing unnecessary entities before the file translates into SOLIDWORKS.

    Performance Considerations

    It is important to remember that an imported DXF/DWG file results in a SOLIDWORKS sketch. Like any native sketch, the more entities a sketch contains the more effect it has on performance. When importing a DXF/DWG file to a new part, the following option in the SOLIDWORKS system options can lessen the performance impact.

    Tools > Options > System Options > Sketch > Turn off Automatic Solve Mode…

    On the Document Settings page of the DXF/DWG Import wizard, the Add constraints option can have a significant effect on performance. Activating this option attempts to solve all relations in the resulting sketch and may lead to over-defined relations.

    1. Large number of blocks

    While SOLIDWORKS provides full support for the import of AutoCAD blocks in DXF/DWG files, performance issues can arise if there is a large number of blocks. If a DXF/DWG file contains more than 200 blocks, the following warning appears, which recommends that the block data be exploded.

    SOLIDWORKS has a part-modeling limit of a 1000-meter cube centered on the origin, +500 meters and -500 meters across the origin. This limit can lead to import errors with very large DXF/DWG files. If an imported file has entities that fall outside of the SOLIDWORKS modeling limit, they cannot be imported, which results in the creation of an error log. Opening the report returns a list of the individual entities for investigation.

    AutoCAD Font Support

    C:\[SOLIDWORKS installation directory]\data\drawfontmap.txt

    You can edit the map file to substitute other SOLIDWORKS TrueType® fonts for the corresponding AutoCAD font. Always install additional fonts on the computer and in the Windows\Fonts folder.

    The font map file is a straightforward space-delimited text file. The left column displays the AutoCAD font, the middle column displays the SOLIDWORKS or Windows equivalent font, and the right column displays the width adjustment factor.

    We hope that you find this document informational and useful and request that you leave a brief feedback about the topics that you want us to cover in the next revision of this document. Click here for a complete list of SolidPractices documents available from DS SOLIDWORKS Corp.