Extract AutoCAD 2D Files
- Last UpdatedJul 02, 2025
- 11 minute read
The Gateway extracts the files from AutoCAD 2D data sources such as .DWG/.DXF files.
To configure extraction of the AutoCAD 2D files:
-
Click Extract from the left panel.
-
Select the type of Input Source from the drop-down box, that is, File System, S3 or AVEVA Cloud Storage.

For FileSystem as Input Source:
-
Define the Input Path for the location of the input files (.DWG/.DXF files), either typing directly or use the Browse File Path to select a single file or Browse Folder Path to select a folder of files.
-
Define the Layouts Selection details, Visual Styles, and Fonts and Support Folders as mentioned below.
-
Select Save Settings.
For S3 as Input Source:
To configure the extractor for S3 as input source:
-
Define the elements in S3 Credential Details section. For more information, see Access an AWS S3 Bucket.
-
If you want to test connection to S3 Bucket, select Test Connection. The result of the test is displayed in the bottom left status bar.
-
Define the Layouts Selection details, Visual Styles, and Fonts and Support Folders as mentioned below.
-
Select Save Settings.

For AVEVA Cloud Storage as Input Source:
To configure the extractor for AVEVA Cloud Storage as input source:
-
Click Connect to establish connection with the AVEVA Cloud Storage. For more information about accessing AVEVA Cloud Storage, see Access AVEVA Cloud Storage.
-
Select the Store where you have uploaded the .DWG/.DXF files.
The Input Path name can be given as a Directory Name or a FileName.

-
Define the Layouts Selection details, Visual Styles, and Fonts and Support Folders, as mentioned below.
-
Select Save Settings.
Layouts Selection:
Each .DWG file contains a Model space where the graphics of the model (drawing) are created and other layouts called paper spaces. Designers often use the paper spaces to add title blocks, tables, notes, dimensions, and even change the scale of the drawing for plotting purposes. Designers sometimes create these plotting entities in the Model space and do not use paper spaces at all, but usually one or more of the paper spaces get printed and would be expected to be viewed in Workhub and Dashboard.
To choose the layout view or views that needs to be rendered into one or more SVG files, define the Layouts Selection filter. This can contain one or more keywords or regular expressions, separated by a pipe "|" character. The possible keywords are:
-
#Active# - extracts the last viewed layout when the drawing was saved (this is the default filter).
-
#All# - extracts all layouts.
-
#AllPaper# - extracts all paper layouts.
-
#Model# - extracts the Model space.
-
#1st paper# - extracts the first paper space.
The Layouts filter contains the name of a layout or a regular expression that can filter multiple names of paper spaces.
Example:
-
#Model#|Tank.* - extracts the Model space and all paper spaces matched to the regular expression "Tank.*".
-
#1st paper#|#Model# - extracts the Model space and first paper space after Model space.
Notes:
-
It is possible to set tracking of changes on Extraction of data using annotations feature. For information about annotations, see Tracking Changes in Data.
-
The Gateway does not extract any OVERLAID XREF files in models.
-
The Gateway can identify some key attributes, for example, ObjectID, ObjectName, Revision and so on will be exported into EIWM file even without mapping in configuration. For more information about these key reserved attributes, see Appendix F: Reserved Attributes Used in the Gateway.
Visual Styles
AutoCAD can project three-dimensional models into two-dimensional viewports in several different styles, and supports multiple pattern styles that do not render efficiently in the SVG format. These can be controlled by extraction configuration to reduce processing and SVG rendering time:
-
Specified hatches can be exported with solid fill type.
-
Viewports can be exported as vectors or raster images (embedded images).
Notes:
-
Data to raster image conversion should be used with caution as it can result in the loss of engineering data and tagging capabilities.
-
Complex Hatch patterns can only be mapped to Solid patterns.
Example Extractor Configuration file:
<VisualStyles>
<Viewports>
<Viewport style="mixed" resolution="1"/>
</Viewports>
<Blocks>
<Block name="companyLogo1" imageLocation="c:\logo1.png"/>
<Block name="companyLogo2" imageLocation="c:\logo2.png"/>
</Blocks>
<Hatches>
<Hatch inputFillPattern="DOTS" maxScale="0.1" outputFillPattern="SOLID"/>
<Hatch inputFillPattern="AR-CONC" maxScale="0.1" outputFillPattern="SOLID"/>
</Hatches>
</VisualStyles>
Select style and resolution for viewports in GUI:

Access to the settings for the 'Blocks' and 'Hatches' nodes is via editing the configuration file and not available in the User interface.
Navigate to 'General' panel to edit the Extract Configuration file:

Viewports
The AutoCAD Gateway contains 10 types of Viewport styles:
-
2D Wireframe
-
Wireframe
-
Hidden
-
Sketchy
-
Realistic
-
Shaded
-
Shaded with edges
-
Shades of Grey
-
X-ray
-
Conceptual (custom)
Viewport content can be extracted as wireframe or raster.
Setting "mixed"
-
2D Wireframe, Wireframe - extracted as wireframe.
-
Hidden, Sketchy, Shaded with edges, Shades of Grey, X-ray, Realistic, Shaded - extracted as raster.
-
Conceptual - depends on custom view settings.
Setting "wireframe"
-
All viewports extracted as wireframe.
Setting "raster"
-
All viewports extracted as raster images.
Notes:
-
Model space is also treated as a view port.
-
A raster image is not scalable like a block's vector graphics so it loses its quality when stretched. Therefore, you should prepare the raster image with the same aspect ratio as the block's graphic.
The table below compares the styles in AutoCAD and SVG for the "mixed" setting.
|
AutoCAD |
SVG |
|---|---|
|
|
Wireframe |
|
|
Raster |
|
|
Raster |
|
|
Raster |
For the "wireframe" setting, all viewports are exported to SVG as wireframe graphics.
|
AUTOCAD |
SVG |
|---|---|
|
All types: 2D Wireframe Wireframe Hidden Sketchy Shaded with edges Shades of Grey X-ray Realistic Shaded Conceptual (custom) |
|
The following table compares raster quality in SVG for different "resolution" setting:
Resolution = 0.5, resolution = 1 (default), resolution = 5
|
Resolution = 0.5 |
Resolution = 1 (default) |
Resolution = 5 |
|---|---|---|
|
|
|
|
Notes:
-
Minimum resolution factor: 0.1.
-
Maximum resolution factor: 10.
-
A resolution of 5 creates crisp output and for most models higher resolution values only result in larger SVG files that take longer to render.
-
The possible image formats can be: PNG, JPEG, and BMP.
Blocks
Specified block replaced with raster image.
Example of Block Configuration:
<Blocks>
<Block name="companyLogo1" imageLocation="c:\logo1.png"/>
<Block name="companyLogo2" imageLocation="c:\logo2.png"/>
</Blocks>
Hatches
A pattern specified in "inputFillPattern" and with a scale that does not exceed the value specified in "maxScale" is mapped to the "outputFillPattern" (only SOLID fills are available).
Note: This mapping is part of the extraction process and is always done prior to any color presentation mapping. Therefore, the color of the output solid is the same as the input pattern unless modified by a color mapping,
Example:
A DWG drawing contains two hatches with a 'DOTS' pattern. The first hatch has a scale 0.4 and the second hatch 1.0. If the following configuration is specified, then the first will be exported as a solid fill and the second will be rendered in the original DOTS pattern as its scale is greater than the maxScale:
<Hatch inputFillPattern="DOTS" maxScale="0.5" outputFillPattern="SOLID"/>

Fonts and Support Folders:
Some drawing elements use pre-defined shapes that are defined in separate files, for example, fonts. If those files are not in the same location as the drawing files, then you must specify the Support Folder, either in the project's configuration or in a system variable.
Specify the Support Folder location for the project in the Extract Configuration page.
As it is common to locate all font files in a common system folder, set this location in a System Environment Variable under the User variables for section.
The Gateway reads any location (or locations) saved into a system environment variable named ACAD along with the locations defined in the project configuration. Multiple folder paths should be separated by a semicolon, as shown in the following image:

Note: The ACAD environment variable defines the location of the SHX fonts directory.
SHX Definition File Processing
The SHX definition file used in the DWG/DXF drawing being processed is available during processing to create output graphics. SHX fonts can be placed in any location accessible from the Gateway program. Common SHX fonts are delivered together with AutoDesk AutoCAD or TrueView installations. An example default location is "C:\Program Files\Autodesk\AutoCAD 2019\Fonts".
-
Defined directly in the system settings: The access path can be defined directly in the system settings as following: Environment Variables -> User Variables, "ACAD" variable.
-
Customize the fonts: They can be also used custom fonts in a DWG/DXF drawing.
-
Accessible: The file path is accessible during processing.
-
Define Multiple Paths: The variable "ACAD" takes multiple paths to different locations of SHX files. If you set them in system settings, then separate them with semicolons, for example: "C:\Fonts;E:\Custom Fonts".
-
If you do not want to use the environment variable "ACAD" to indicate the location of SHX fonts, do so in the Gateway’s Extractor’s settings.
-
Select "Browse for folder containing the fonts and support files" to add a location.
-
Select "Delete selected paths" to remove the selected location.
Note: A special case is the path where the processed DWG/DXF input file is located. In this location, the program always looks for SHX fonts.
Define multiple support folders in the project. The following image shows multiple support folders marked as Project Setting in the Source column. Any folders defined via the System User Variable are marked as Environment Variable.

-
Location order when defining the SHX fonts is as follows:
-
SHX temporary replacement folder - Not visible for user (see 'SHX to SHX' mapping in the below SHX fonts subsection). This is used only internally by the program for the mapping
-
Locations defined in Environment Variables
-
Locations defined in the Extractor configuration
-
Location of input drawing
Multiple support folders can be defined in the project and are marked 'Project Setting' in the 'Source' column. Any folders defined via the System User Variable are marked as 'Environment Variable'.

Notes:
-
Limitation in the User Interface: After the first processing, changing the paths set has no effect. If you want to use a different set of paths, then close the program, reopen, make changes, and start processing. It also applies if you want to change the list of file paths in the same project.
-
Environment Variable cannot be modified from the Gateway's configuration page.
SHX fonts
The SHX font group is specific to AutoDesk AutoCAD drawings. It is a font of the Compiled Shape File type (SHX). It consists of font definitions as well as shape definitions for displaying the text.
During processing, all texts that use the font defined by SHX are vectorized and appear as polylines in the SVG output file. This is desirable when you want to accurately reproduce the appearance of the text. This solution usually causes SVG output files to be larger.
Note: If an SHX font is not made available then the Gateway will use the SHX "Simplex" font as a default to vectorize the text.
This vectorization feature can be configured by mapping of the SHX fonts. This mapping uses Transformer extension 'Text Mapping'. It contains section 'Font Mapping' which implements True Type mapping and CAD font mapping. If there is a mapping that corresponds to SHX it is passed to extractor. All CAD mappings are passed in parameter to extractor in one package. This is resolved by AC2D gateway invoker.
The following SHX font mapping combinations are available: SHX to SHX and SHX to TTF.
-
SHX to SHX
Consider mapping simplex.shx to complex.shx. The Gateway searches for the file complex.shx in all 'Fonts and support folders' and copies it to a temporary replacement folder (%TEMP%\ACAD_SHX_REPL) where its contents are used to create the complex.shx graphical elements at the locations of the input simplex.shx graphical elements.
Example SHX to SHX mapping:
<font from="simplex.shx" to="complex.shx" regEx="false" />
This expression maps SHX font "Simplex" to SHX font "Complex", so output SVG will contain text represented as polylines as a result of vectorization using SHX font "Complex".
Notes:
-
Before each processing, this folder is cleaned up.
-
SHX Font mapping attributes such as sizeFactor, italic or bold for are not supported.
-
-
SHX to TTF
Example SHX to True Type mapping:
<font from="simplex.shx" to="arial" regEx="false" />
This mapping maps SHX font "simplex" to True Type "arial". In output SVG, there will text with font family "Arial".
It can be used regular expression in the "from" attribute.
Note: If you want to map SHX font then regardless if you use RegEx form or not, the field "from" must contain ".shx" string to be differentiated from True Type font where setting extension is not necessary.
Example SHX to True Type mapping with using regular expression:
<font from="[a-z]*plex.shx" to="arial" regEx="true" />
This expression maps all SHX fonts where filenames end with "plex.shx" (for example, simplex.shx, complex.shx) to True Type "Arial" font. In output SVG, text with font family "Arial" appears.
The following SHX font mapping combination is not available:
-
TTF to SHX – The program does not allow the configuration to be loaded (when opening the project) or it will return an error when trying to save the Text Mapping extension configuration.
Logging
All fonts mappings are logged.











