Feature Description
This function is used to import mainstream CAD format files such as AutoCAD's DWG, DXF, and MicroStation's DGN as CAD Datasets or simple datasets, including: *.dwg, *.dxf, *.dgn files, achieving seamless connection between engineering design and GIS data.
Among them, AutoCAD Drawing Exchange Format (*.dxf) is a file format developed by Autodesk for data exchange between AutoCAD and other software formats. It is an ASCII or binary file format for graphic files, used to export graphics to other applications and import graphics from other applications; AutoCAD Drawing (*.dwg) is a graphic file of AutoCAD, a standard file format specifically designed to save vector graphics. MicroStation DGN (*.dgn) is a vector graphic file format used by MicroStation and its related applications.
The supported versions of AutoCAD data are as follows:
- SuperMap iDesktopX 10.1.2 and earlier versions support data from versions before AutoCAD 2015;
- SuperMap iDesktopX 10.2 and newer versions support data from AutoCAD 2021 and earlier versions.
Function Entrances
- Start tab -> Data Processing group -> Data Import -> Vector group -> AutoCAD.
- In the workspace manager -> Datasource context menu -> Import Dataset....
- Tools in Toolbox -> Data Import -> AutoCAD: Import DXF, Import DWG, Import DGN.
Operational Steps
- In the Data Processing group under the Start tab, click the Data Import button.
- In the Data Import dialog box, click the Add File button, and the Open dialog box pops up. In this dialog box, locate and open the path where the data to be imported is located.
- For parameter descriptions of the target datasource, result dataset, encode type, import schema in result data, and source file info, please refer to the Data Import Common Parameters description page.
- Result Data
- Dataset Type: Select the dataset type after import, or simple dataset.
- CAD: Selecting this option imports the data file as a CAD Dataset.
- Simple Dataset: Selecting this option imports the data file as a simple dataset, i.e., point, line, region, text, attribute, compound line, compound region dataset.
- Create Spatial Index: Checking this option creates a spatial index for the dataset according to the index types supported by the dataset, improving the efficiency of spatial queries and data access.
- Import Null Dataset: Check this box. If the imported dataset is an empty dataset, an empty dataset with no objects is imported by default. Otherwise, the program will prompt that the import failed.
- Dataset Type: Select the dataset type after import, or simple dataset.
- Transformation Parameters
Notes:- When the function entrance is opened from the tab ribbon, the system determines whether parameters are optional based on the imported data format. For example, when importing DXF data, 'Set Scale Factor' is grayed out and cannot be set.
- When the function entrance is opened from the toolbox, some parameters are not displayed in the tool dialog box depending on which import data tool is opened.
- Curve fitting precision: Sets the precision of borders of lines or polygons. 73 is by default. Only works when importing AutoCAD DXF (*.dxf) files and AutoCAD Drawing (*.dwg) files, and is ignored for other data formats.
- Font Library Setting: If the imported source file has related font files (*.shx), they need to be added here for import together to avoid missing fonts or incomplete display in the CAD data.
- Unite Layers: Check this box to merge all layers into one layer when importing DWG/DXF files. By default, multiple CAD layers are merged into one layer during import.
- Import Symbol Block: This checkbox is used to set whether to import block objects, or treat them as point objects when importing DWG/DXF files. Import symbol blocks by default.
- Import Extended Field: Used to import data similar to attribute tables in AutoCAD drafting along with CAD format graphic data. External extended data after import is formatted as some additional fields. This item only works when importing AutoCAD DXF File (*.dxf) and AutoCAD Drawing File (*.dwg). The system defaults to not checking this box, meaning external extended data is not imported; if checked, external extended data is appended after the default fields when importing CAD format data.
- Import Invisible Layers: Check this box to import invisible layers in AutoCAD graphic files when importing DWG/DXF files. In AutoCAD, invisible layers are practical. When there are multiple layers, different layers save different types of objects. When such objects do not need to be displayed, directly set that layer to invisible, and set it to visible next time it is used.
- Import Block Attribute: Check this item to import the block attributes of the data during import; if not checked, block attributes are ignored during import.
- Import Extented Records: Check this item to import the custom fields and attribute fields as extension fields; if not checked, it means not importing user definable fields and property fields.
- Keep Object Height: When importing CAD containing 3d objects (such as 3D polylines), check this item to retain the 3d object height information (the Z coordinate value of the object) during import; if not checked, the height information is not retained after import. After successfully importing DWG/DXF, an Elevation field is generated in the attribute table of the resulting dataset to store object height information.
- Keep Parametric Object: When importing CAD containing parametric objects, check this item, and the generated CAD dataset after import contains compound region or compound line objects with parametric objects; if this item is not checked, parametric objects are not included after import.
- Keep Line Width: Check this box to retain the width of polylines (Polyline) in the AutoCAD graphic file when importing DWG/DXF files. In CAD, a polyline is a multi-segment line composed of a series of lines and arcs, and each segment can define its own line width. Retains the originally defined polyline width by default.
- Set Scale Factor: When the imported data is *.dgn data, supports setting the scale factor values in the X, Y, and Z directions of the data.
- Unit object is imported as the point object: When the imported data is *.dgn data, used to set whether to import the unit object as the point object, not selected by default. If selected, replaces the position of an object unit with a marker.
- Unite Layers: When the imported data is *.dgn data, used to set whether to merge layers after import, not selected by default. If selected, all CAD layers of the same type are merged and imported as one dataset; if not selected, each CAD layer is imported as a separate dataset.
- Closed line to face: Used to set whether to generate a corresponding region dataset for closed lines when importing *.dwg and *.dxf files.
- Selected - After importing closed lines, the corresponding region dataset is generated while retaining the original line dataset.
- Not Selected - After importing closed lines, only the line dataset is retained.
- Fills the object turn point: Used to set whether to convert fill objects (Hatch) and proxy entities (ProxyEntity) to point datasets when importing *.dwg and *.dxf files.
- Selected - Fill objects are only imported as point datasets; proxy entities themselves are imported as point datasets, and their child objects (lines, regions, etc.) are still imported according to their original primitive types.
- Not Selected - Fill objects and proxy entities and their child objects (lines, regions, etc.) are imported according to their original primitive types.
- Styles: Supports adding a style mapping table to set the imported CAD Style.
Style Mapping File: The style mapping table file extension is *.stt. This file contains 7 parts: the header of the style mapping table, the version of the mapping table, line style mapping, font mapping, fill mapping, symbol mapping, dxffile file, as shown in the following example:
SuperMap Style Mapping Table
Version 6.0LineStyleBegin
(id:Continuous),(id:963867;c:0xff0000;w:1)
LineStyleEndSymbolBegin
(id:GROUND),(id:1110;g:Root Group;c:0x0000ff;a:0; s:1)
SymbolEndFillStyleBegin
(id:ANGLE),(id:015;a:60;fc:0xff0000;bc:0x000000)
FillStyleEndFontBegin
(id:arial),(id:System;a:0;fc:0x00ff00;bc:0x000000;xs:1;ys:1)
FontEnddxffile
Expstyle.dxfAmong them: SuperMap Style Mapping Table is the header part of the style mapping table; Version 6.0 is the version of the current mapping table; LineStyleBegin is the beginning of line style mapping; LineStyleEnd is the end of line style mapping; SymbolBegin is the beginning of symbol mapping; SymbolEnd is the end of symbol mapping; FillStyleBegin is the beginning of fill mapping; FillStyleEnd is the end of fill mapping; FontBegin is the beginning of font mapping; FontEnd is the end of font mapping; dxffile is the label identifying the dxf file that saves the style, for export use.
The dxf file indicated by the dxffile tag is a user definable file, which can save blocks, line styles, and text style definitions.
All styles for symbol and line style mapping are defined by blocks and line types saved in the dxf file; fill style only maps entity fills and the fill pattern scale is always 1; text height and color are consistent with SuperMap, and the rest are consistent with the styles defined in dxf.
If a style mapping is set during export but not defined in the dxf file, the default styles are still used.
- Line Style Mapping: The line style mapping part starts with the keyword LineStyleBegin and ends with the keyword LineStyleEnd. Each line between them defines a line style correspondence. A line style correspondence consists of two fields, separated by the delimiter ",". The field composition is as follows:
Field 1 Field 2 External data line style name SuperMap data line style name; color; width (unit is mm) - Symbol Mapping: The symbol mapping part starts with the keyword SymbolBegin and ends with the keyword SymbolEnd. Each line between them defines a symbol correspondence. A symbol correspondence consists of two fields, separated by the delimiter ",". The field composition is as follows:
Field 1 Field 2 Mapped block reference or DGN cell name SuperMap symbol name; the group name where the symbol is located; color; symbol tilt angle; symbol scaling ratio - Fill Mapping: The fill mapping part starts with the keyword FillStyleBegin and ends with the keyword FillStyleEnd. Each line between them defines a fill correspondence. A fill correspondence consists of two fields, separated by the delimiter ",". The field composition is as follows:
Field 1 Field 2 External fill mode name SuperMap fill name; fill rotation angle; fill foreground color; fill background color - Font Mapping: The font mapping part starts with the keyword FontBegin and ends with the keyword FontEnd. Each line between them defines a font correspondence. A font correspondence consists of two fields, separated by the delimiter ",". The field composition is as follows:
Field 1 Field 2 External font SuperMap font; font rotation angle; font foreground color; font background color; font X scaling ratio; font Y scaling ratio
- dxffile File: The dxffile file is identified by the keyword dxffile and is used for exporting dxf and dwg formats. This tag is invalid during import and can be omitted.
- Line Style Mapping: The line style mapping part starts with the keyword LineStyleBegin and ends with the keyword LineStyleEnd. Each line between them defines a line style correspondence. A line style correspondence consists of two fields, separated by the delimiter ",". The field composition is as follows:
- After the settings are completed, click the Import button to execute the operation of importing the CAD file.
Notes:- Currently, the 3D Scene Rendering Engine V2 does not support importing CAD Dataset.
- If the imported data contains parametric objects and the Keep Parametric Object checkbox is selected during import, it is divided into the following two situations based on the selected dataset type:
- CAD: If CAD is selected as the dataset type during import, the generated CAD Dataset after import contains compound region or compound line objects with parametric objects.
- Simple Dataset: If Simple Dataset is selected as the dataset type during import, a separate compound region or compound line dataset is generated after import to store parametric objects.
Related Topics
Data Import/Export Supported Formats