|
Exporting objects located on different layers |
Scroll |
When a KOMPAS document is exported to DXF or DWG format, there are several ways to export objects located in different layers:
•objects placement in their dedicated layers,
•groups of KOMPAS-3D layers may be merged into AutoCAD layers;
•objects placement in layers.
Depending on the color settings (see section Setting object colorsObjects in the resulting document can be displayed with their own colors or the color of their layer.
The layer states in the resulting document depend on the states of layers and their master views in the document being converted (see Table below).
In KOMPAS-3D, the state of views and layers is defined by the combination of two properties: activity and visibility. The values of the activity property are "active" and "background". The values of the visibility property are "visible" and "hidden". In AutoCAD, the state of a layer is defined by the «unlocked»/«locked» and «enabled»/«disabled» properties. These properties function similar to the aforementioned KOMPAS-3D properties.
•If a layer of the KOMPAS document is not visible (i. e. it's hidden ot it is located in a hidden layer), then this layer will be disabled and unlocked in the AutoCAD document regardless of the activity property.
•If a layer is visible in the KOMPAS document, this layer will be enabled in the AutoCAD document. The active layer becomes "unlocked", and the background layer becomes "locked".
Thus the exported document, when opened in AutoCAD, will have the closest possible condition to the original KOMPAS-3D document prior to conversion.
Layer states when exporting KOMPAS-3D documents to AutoCAD
View and layer states in KOMPAS-3D |
|
Layer states in AutoCAD |
|||
View state |
Layer state |
|
Locked/Unlocked |
Enabled/Disabled |
|
Active, visible |
Unlocked |
Enabled |
|||
Active, visible |
Background, visible |
Locked |
Enabled |
||
Hidden |
Unlocked |
Disabled |
|||
Active, visible |
Locked |
Enabled |
|||
Background, visible |
Background, visible |
Locked |
Enabled |
||
Hidden |
Unlocked |
Disabled |
|||
Hidden |
any |
Unlocked |
Disabled |
||
In addition to layers exported from KOMPAS-3D, a system layer with the name "0" is generated in the resulting DXF or DWG document. When the KOMPAS drawing is exported, the following objects are placed on that layer:
•sheet detailing (border and title block),
•unspecified surface finish mark,
•technical specifications;
•BOM on sheet,
•revisions table.
|
When exporting objects distributed among layers, you can select any layers for sheet detailing, unspecified surface finish mark and technical requirements. |
|
If you intend to import with placing objects in their own layers, it is recommended to assign unique layer names within the KOMPAS document. If you intend to import with merging layers, then the layers to be merged should be assigned same names, and other layers should have unique names within the document. |
Placing objects in their dedicated layers
If the Unite same name layers in one and Distribute KOMPAS objects by AutoCAD layers on the Layers page are disabled, then the number of layers in the AutoCAD document will be the same as in the exported document. That is, during export all objects are placed in their dedicated layers. The layers are named according to the following rule:
•of the name of the layer is unique within the document, it remains unchanged,
•if there are several layers with identical names, serial numbers are appended to the names, starting with 1,
•if a layer has no name, the name "LAYER" is assigned to it;
•if there are several layers with no name, the name "LAYER" followed by the serial number starting with 1 is assigned to them.
Examples of naming layers according to this rule are provided in the table below.
Examples of layer names when exporting KOMPAS-3D documents to AutoCAD
KOMPAS-3D |
|
AutoCAD |
|||
Number of View |
View Name |
Layer name |
|
Layer name |
|
0 |
System View |
System |
System |
||
0 |
System View |
Contours |
Contours |
||
0 |
System View |
Designations |
Designations |
||
1 |
Cut |
Designations |
Designations(1) |
||
1 |
Cut |
LAYER |
|||
2 |
Cut |
Dimensions |
Dimensions |
||
3 |
Leader Element |
Dimensions |
Dimensions(1) |
||
|
Layer names in AutoCAD may not contain the following characters: < > ^ \u201c \u201c : ; ? * \/ , = '. If a layer name in KOMPAS contains some of these characters, then in the AutoCAD document these characters will be substituted with the tilde sign ~. |
In AutoCAD document it’s possible to create a layer combining several layers of the KOMPAS. The layers may be merged if the following properties are identical:
•names,
•colors,
•states.
To enable merging of layers, please enable the Unite same name layers in one setting on the Layers page. This means that after you define the layer states (see Table Layer states when exporting KOMPAS-3D documents to AutoCAD) among them, groups of layers with matching parameters (states, names, colors) will be highlighted. Layers of each group will then be merged into new layers. The resulting layers are named according to the following rule:
•of the name of the resulting layer is unique within the document, it remains unchanged,
•if there are several resulting layers with identical names (with different color or status), serial numbers are appended to the names, starting with 1.
If some layers cannot be merged, they are placed on different layers in the resulting document. They are named according to the rules set out in section Placing objects in their dedicated layers.
|
If all the system layers in the imported KOMPAS document have the same status and colors, then after merging all the objects of these layers are placed into a system AutoCAD layer called "0" (zero). |
Using the Distribute KOMPAS objects by AutoCAD layers setting on the Layers page, you can generate dedicated layers for various KOMPAS objects (detailing, texts, hatching, dimensions, etc.) and curves with different line styles. In other words, using the Layers page, you can set up the way the KOMPAS-3D objects are distributed in the AutoCAD layers without preserving the original layer structure. This may be required to ensure the exported drawings are consistent with the company standards.
In the view window, a table is displayed with the list of KOMPAS-3D object categories, and AutoCAD layers colors and names to place these objects by default.
|
The object type category (Points, NURBS curves, Hatches, etc.) has priority over the line style category (Main lines, Fine lines, etc.). Hence, if an object belongs to two categories at the same time (e. g. a NURBS curve with Normal line style), this object will be placed in the layer defined for the type category. |
To modify the color of a layer, click the color cell and select the new color in the dialog box.
To rename a layer, click the cell in the Layer column and enter the new name.
If you want to create the layers similar to the KOMPAS-3D layers to place the objects of the selected category, please enable the Place object on source layer setting in the leftmost column. When you are done, press the Save button.
|
If you enable the Place object on source layer setting for some objects, like detailing, technical specifications or undefined surface finish, these objects will be placed in the system AutoCAD layer called "0" (zero). |
To save the settings made in the file, click the Save to file
button. In the dialog that appears, specify the name of the file to be written. The software will generate a binary file with information about AutoCAD layer names and colors for KOMPAS-3D objects (*.lac).
|
It makes sense to create a file of association between the KOMPAS-3D objects and the AutoCAD layers if you intend to export several documents with the same settings. |
To use a previously created *.lac file, click File.
To discard custom placement of KOMPAS-3D objects in AutoCAD layers, click the By Default
.