Please enable JavaScript to view this site.

By default, when importing DXF or DWG files, in the KOMPAS-3D document custom line styles are created with the same names and appearance as in AutoCAD. These line styles are stored in the resulting document. To view them, select Settings — Style libraries — Line styles…

You can edit the line styles in the resulting document or you can edit the objects and select different styles for them. However, it may take a long while to edit a set of documents this way.

You can set up the import process to enable automatic substitution of AutoCAD lines with system or library KOMPAS-3D style lines.

To use this import mode, please enable the Set line type correspondence setting on the Line types page. After that, all other options and buttons on this page will become available, and you'll be able to set up the association: set the AutoCAD line types and select the substitute KOMPAS-3D line styles.

In the view window, the AutoCAD column shows the line color, thickness and type name in AutoCAD, and the KOMPAS-3D column shows the name of the line style in KOMPAS-3D.

To add a new association, click the Add button to the right of the preview window. In a row that appears, please enter the name of the AutoCAD line type, its color and thickness, then set a system or library KOMPAS-3D line style.

To remove an association, please select the required row in the view window and press the Delete .

An imported document may contain many types of lines. To avoid listing them manually and typing names, click the Import from AutoCAD drawing . The view window will display the list of line types in the selected AutoCAD document along with the colors and thickness of these lines.

You can save the settings in the line type and style association file (*.als). To do this, click the Save to file button. In the dialog that appears, specify the name of the file to be written.

It makes sense to create a line type and style association file if you intend to import several files received from the same source, that is, if you need to import several documents with the same settings.

To use the *.als file, click File.

To discard custom association of line types and styles, click the Default .

Default association of the AutoCAD and KOMPAS-3D line styles and the description in the syslib.als system file contain no information about the thickness of lines. Meanwhile, the thickness value is not listed in the table, and AutoCAD lines are substituted with no regard to their thickness.

Line type and style association file (*.ALS)

The *.als files are text files. You can create and edit these files in any text editing program in addition to the Import Settings dialog box. This way you can add or remove associations.

Example of an *.als file:

Continuous|1|1|0.2|

Continuous|1|0|0.7|

Continuous|2|4|

Continuous|3|

Center|5|2|0.18|

Dashed|30|3|0.18|

Divide|150|5|

FENCELINE2 | 7 | 6 | 0.18 | D:\\KOMPAS-3D V...\\Sys\\Graphic.lcs |

Each line of this file contains one association with the following syntax: line type name in AutoCAD, vertical bar, line color number in AutoCAD, vertical bar, system style number or library style number in KOMPAS-3D, vertical bar, thickness in AutoCAD (in mm), vertical bar, absolute path of the line style library file, vertical bar.

The system line styles in KOMPAS-3D have the following numbers:

normal 0

thin 1

centerline 2

dashed 3

thick 4

dash-dots with 2 dots 5

normal centerline 6

normal dashed 7

construction 8

for broken line 9

ISO 02 Dashed Line 10

ISO 03 Dashed Line (long space) 11

ISO 04 Dash Dot Line (long dash) 12

ISO 05 Dash Dot Line (long dash 2 dots) 13

ISO 06 Dash Dot Line (long dash 3 dots) 14

ISO 07 Dotted Line 15

ISO 08 Dash Dot Line (long and short dashes) 16

ISO 09 Dash Dot Line (1 long and 2 short dashes) 17

ISO 10 Dash Dot Line 18

ISO 11 Dash Dot Line (2 dashes) 19

ISO 12 Dash Dot Line (2 dots) 20

ISO 13 Dash Dot Line (3 dots) 21

ISO 14 Dash Dot Line (2 dashes 2 dots) 22

ISO 15 Dash Dot Line (2 dashes 3 dots) 23

For example, if you try to import a document using the aforementioned *.als file, the line styles for the imported objects will be selected as follows.

Lines in the AutoCAD document of type Continuous, having color No. 1 (red) and thickness 0.2 mm, will be replaced by KOMPAS-3D line No. 1, i.e., a thin line.

AutoCAD document lines of type Continuous, with color No. 1 (red) and thickness of 0.7 mm, will be replaced by KOMPAS-3D line No. 0, i.e. by the main line.

AutoCAD document lines of type Continuous and color No. 2 (yellow), regardless of their thickness (including with thickness "default"), will be replaced by KOMPAS-3D line No. 4, i.e., a thickened line.

AutoCAD document lines of type Continuous, colored No. 3 (green), regardless of thickness (including with "default" thickness), will be replaced by KOMPAS-3D line No. 1, i.e., a thin line.

AutoCAD document lines of the type Center, with color No. 5 (blue) and thickness of 0.18 mm, will be replaced by KOMPAS-3D line No. 2, i.e., centerline.

AutoCAD document lines of type Dashed, having color № 30 (orange) and thickness 0.18 mm, will be replaced by KOMPAS-3D line №3, i.e. dashed line.

AutoCAD document lines of type Divide, having color No. 150 (light blue) regardless of thickness (including "default" thickness), will be replaced by KOMPAS-3D line No. 5, i.e., dash-dot with 2 dots.

Lines in an AutoCAD document of type FENCELINE2, having color No. 7 (black) and thickness 0.18 mm, will be replaced by a line with style No. 6 (Barrier Fence) from the line style library Graphic.lcs, located in the subfolder \Sys of the main system folder.

Specialized custom line styles will be created for all other line types in the imported document, including the Continuous, Center, Dashed, Divide and FENCELINE2 lines, which have colors and/or thicknesses different from those specified in the file under consideration.

If it becomes evident during import that the library contains no style with the number specified in the *.als file, or the library itself is not present at the path specified in the *.als file, then the corresponding AutoCAD line type is replaced with the KOMPAS system line "Thin (#1)".

If you are sending an *.als file with references to the *.lcs custom style libraries to another computer, you should also send these libraries along with the file. If you want to use the *.als file on another computer, all the libraries must be located in the corresponding folders as specified in this file. If it may lead to a problem (e. g. there is no hard drive with the specified letter in the target system), please edit the *.als file and make sure the paths to the actual line style libraries are correct.

Importing lines with default thickness

In a document imported from AutoCAD, lines of certain objects may have "default" thickness. The thickness of these lines depends on the current settings of AutoCAD; these settings may be different between sessions and workplaces. That is, "default" thickness means that in fact there is no precise thickness set. When importing documents with objects with "default" line thickness, please take the following into account.

If the setting for mapping line types and styles is performed (option Set line type correspondence enabled), then in the mapping settings dialog for the line type used in objects with the line thickness "default", you should not enter a thickness value — you need to specify the color and line type in AutoCAD and the line style in KOMPAS-3D, and disable the Thickness option.

If the line type and style association is not configured during import (the option Set line type association is disabled), or if no association is found as configured in the previous item, then in the KOMPAS-3D document, a custom line style with a thickness of 0.18 mm will be created for lines with the "default" thickness.

If there are lines with "default" thickness detected when importing a document (by pressing the Import from AutoCAD drawing button), the thickness of 0.18 mm is assigned to these lines.

© ASCON-Design systems, LLC (Russia), 2024. All rights reserved.