Example: Set up layers and export in DWG format (old export)

Tekla Structures
Modified: 7 Feb 2022
2024
Tekla Structures

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:

  1. In the model, click the Selection filter switch .
  2. In the Object Group - Selection Filter dialog box, click New filter.
  3. Add new filter rules.
    1. Create a filter rule that select parts according to the name BEAM.
    2. Create a filter rule that selects parts according to the material S* (as in steel).
  4. 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:

  1. On the File menu, click Export > Drawings.
  2. Go to the Layer options tab.
  3. Click Setup and then click Modify layers.
  4. Click Add to add a new layer.

    Create separate layers for solid lines (steel-beam-layer) and hidden lines (steel-beam-layer-H) within steel beams.

  5. Set the color for the layers.

    Set the solid lines to red and hidden lines to blue.

  6. Click OK to accept the changes.

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:

  1. Right-click a model object part rule and select Add Next Level Rule.
  2. Enter a name for the rule (steel-beam-rule) and select the selection filter you created for steel beams (steel-beam).

  3. Click OK.
  4. To assign a layer to a rule, double-click the row under the steel-beam-rule and select a layer, in this case steel-beam-layer.
  5. Click OK.

  6. Save the layer rule settings with the name example1 using Save as.

  7. Close the dialog box by clicking OK.

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:

  1. Open the TeklaStructures.lin file in a text editor ( ..\ProgramData\Trimble\Tekla Structures\<version>\environments\common\inp ).
  2. Add the following line type definition in the file:

  3. Save the file. Ensure that the file name extension does not change.

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:

  1. Open the LineTypeMapping.xml file ( ..\ProgramData\Trimble\Tekla Structures\<version>\environments\common\inp ) in a text editor.
  2. 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.
  3. Save the file. Ensure that the file name extension does not change.

  1. The lines are on the steel-beam-layer layer.
  2. The lines are drawn with XKITLINE00 (solid lines).
  3. 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.
  4. The lines are on the steel-beam-layer layer.
  5. The lines are drawn with XKITLINE02 (hidden lines).
  6. The lines are exported to DASHED lines into a separate layer called steel-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:

  1. Open the drawing that you want to export.
  2. On the File menu, click Export drawings.
  3. Enter a name for the export file.
  4. Set the Type to DWG.
  5. Go to the Layer options tab page and load the layer rule settings that you saved earlier with the name example1.
  6. Select the following check boxes: Use advanced line type and layer conversion, Include empty layers and Object color by layer.
  7. Browse for the LineTypeMapping.xml file.
  8. 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.
  9. 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.

Was this helpful?
Previous
Next