Example: Set up layers and export in DWG format (old export)
This example shows how to define layers and export line types on a certain layer to their own sublayers in the DWG export.
Example: Create a selection filter for DWG export
To create a selection filter:
- In the model, click the Selection filter switch .
- In the Object Group - Selection Filter dialog box, click New filter.
-
Add new filter rules.
- Create a filter rule that select parts according to the name BEAM.
- Create a filter rule that selects parts according to the material S* (as in steel).
- Save the filter as steel-beam.
Example: Create layers for DWG export
After creating a selection filter, you can continue by creating layers that you want to have in the exported DWG.
To create the layers you want to have in the exported DWG:
Example: Create a rule for drawing DWG export and assign a layer to the rule
After creating layers, you can continue by creating a rule to export an object group into a layer, and assign the layer to the created rule.
To create a rule to export an object group into a layer, and assign the layer to the created rule:
Example: Define a custom line type for DWG export
After creating a rule, you can continue by defining a custom line type for continuous lines in the exported DWG. In this example, you will add some line type definitions.
To define a custom line type:
Example: Define line types and weights for layers in DWG export
After defining a custom line type, you can continue by modifying the LineTypeMapping.xml file and defining the line types and weights.
To define the line types and weights:
- Open the LineTypeMapping.xml file ( ..\ProgramData\Trimble\Tekla Structures\<version>\environments\common\inp ) in a text editor.
- Add the line type mappings for the layers as shown inside the lower blue frame in the image below. Do not touch the lines inside the upper red frame.
- Save the file. Ensure that the file name extension does not change.
- The lines are on the steel-beam-layer layer.
- The lines are drawn with XKITLINE00 (solid lines).
- The lines are exported to
CONTINUOUS
lines in DWG. The line color in DWG was already defined in the layer properties (red). The line weight in DWG is 35. - The lines are on the steel-beam-layer layer.
- The lines are drawn with XKITLINE02 (hidden lines).
- The lines are exported to
DASHED
lines into a separate layer calledsteel-beam-layer-H
in DWG. The line color in DWG was already defined in the layer properties (blue). The line weight in DWG is 35.
Example: Export the drawing to DWG
After you have defined all the layer settings, you can continue by exporting the drawing. Before exporting the drawing to DWG, ensure that all the drawing properties are as you wish.
To export the drawing:
- Open the drawing that you want to export.
- On the File menu, click Export drawings.
- Enter a name for the export file.
- Set the Type to DWG.
- Go to the Layer options tab page and load the layer rule settings that you saved earlier with the name example1.
- Select the following check boxes: Use advanced line type and layer conversion, Include empty layers and Object color by layer.
- Browse for the LineTypeMapping.xml file.
- Go to the Options tab, set the scale for the export and select the Export objects as groups check box and, if you want to, Cut lines with text and Export custom lines as split lines.
- Click Export.
Open the exported DWG with an applicable DWG viewer software. You can see that the solid lines of the steel beam are on one layer and the hidden lines are on another layer. You can also see that columns do not match with the layer rules you defined, so they are handled according to other rules.
See below for examples on how the selecting and not selecting Cut lines with text affects the result.
In the following example, Cut lines with text is selected.
In the following example, Cut lines with text is not selected.