Export a drawing in 2D DWG, DXF, or DGN format

Tekla Structures
Modified: 29 Oct 2024
2024
Tekla Structures

Export a drawing in 2D DWG, DXF, or DGN format

You can export Tekla Structures drawings in the 2D DWG, DXF, and DGN v8 format. You can export several drawings at a time.

The drawing export is object based. For example, if you export a rectangular part that is drawn using hidden line types, the result is a rectangular object drawn with a dashed line. In the old line-based DWG export, the result would be many separate short straight lines. Hatches are also exported as hatch objects in CAD and not separate lines.

In the drawing DWG/DXF/DGN export you can:

  • easily set export layers or levels for different objects, and separate mark frames from mark text and leader lines, for example
  • use filters to separate parts from other parts
  • use export layers or levels that have been predefined by standard CAD layer/level settings
  • use base points and model coordinates
  • embed images in the export file so that the images are no longer exported as links

The drawing export does not use font conversion, and the resulting fonts match exactly the fonts that you haven defined and see in the Tekla Structures drawing. With the advanced option XS_DRAWINGS_USE_CAP_HEIGHT_FOR_FONT_HEIGHT you can control which font height system to use in drawings, CAP font height or em font height.

Define export settings and export DWG, DXF, or DGN files

  1. Start the export in any of the following ways:
    • On the File menu, click Export > Drawings, and select the drawings from the displayed Document manager list.
    • Click Drawings & reports > Document manager, select the drawings that you want to export from the Document manager list, right-click and select Export, or click the Export button at the bottom. The Export command is not available when you open the Document manager in the drawing mode.
    • In an open a drawing, on the File menu, click Export drawings.

  2. Click Open preview to show the preview window, where you can also change the displayed drawing if you have selected many drawings for export. To get the preview visible for the first time, click Refresh preview. You can refresh the preview again by clicking Refresh preview. The preview does not get refreshed automatically, because this could take a long time.

  3. In the Save list, load previously saved or predefined export settings.
    If you want to save the modified settings for future use with another name, enter a name for the new settings file and click Save.
  4. In File location, define the location for the exported files.

    The default location for the exported files is the current model folder. The default folder can also be controlled by the XS_DRAWING_PLOT_FILE_DIRECTORY advanced option. You can define a relative file location by adding .\ in front of the output folder name. The specified output folder is saved in the settings. Selecting Open folder when finished opens the export folder after the export.

  5. In the File type list, select DWG, DXF, or DGN (V8).
  6. For the DWG and DXF exports, select the version to be used in export.
    There are several versions of AutoCAD or DXF formats available for the DWG or DXF export, and 2010 is the default. You cannot select a specific version for the DGN export.
  7. Define other settings on the Options tab as necessary:

    File prefix

    File suffix

    Enter a specific prefix or suffix to be used in the file name. The preview of the file name will change accordingly.

    The drawing export supports the following drawing-type-specific advanced options, which you can use to modify the name of the exported file:

    XS_DRAWING_PLOT_FILE_NAME_A

    XS_DRAWING_PLOT_FILE_NAME_C

    XS_DRAWING_PLOT_FILE_NAME_G

    XS_DRAWING_PLOT_FILE_NAME_M

    XS_DRAWING_PLOT_FILE_NAME_W

    For more information about the values that you can give to these options, see Customize print file names.

    Model space coordinates

    The coordinate system determines how the drawing views are exported in the CAD coordinate system. Select one of the following options:

    • Local: Exports the drawing to the null point in the CAD coordinate system. This option uses the left bottom corner of the 1st view frame to set the local coordinates. If the frame is expanded, the local will move.
    • Model: Matches Tekla Structures null point with CAD null point and rotates the CAD coordinate system accordingly in X and Y coordinates. Z coordinates are not supported.
    • Base point: <name_of_base_point>: Matches the selected base point with CAD null point, and rotates the CAD coordinate system accordingly. The base points are defined in the Tekla Structures model through File > Project properties > Base points. Z coordinates are not supported.

      NOTE: Base points work only in plan views in general arrangement drawings.

    Update Tekla Structures linework only

    Update the Tekla Structures drawing content and keep other content that is created in a CAD software intact in the same file. Blocks (groups or cells), created by Tekla Structures will be updated.

    This setting is only shown if you have set the advanced option XS_DWG_EXPORT_UPDATE_TS_LINEWORK_OPTION to TRUE.

    To use this setting, you need to have the same drawing exported already, and the layer/level setup and the template must be the same as during the previous export. All CAD lines that were added previously will stay in the file and only Tekla Structures content will get updated, unless editing was done in a CAD blocks editor.

    If you edit the content of a block (CAD object), and then select the Update Tekla Structures linework only option, the whole block will be re-written, and the changes made in CAD will not be kept. To keep the changes in CAD, you need to explode a block before editing it.

    For example, you may want to use this setting if you have added drawing title blocks in the CAD file after the first export of the drawing from Tekla Structures, and want to keep these title blocks as they are, and update only the objects that exported from Tekla Structures.

    Embed images inside the file

    Embed all images inside the export file. No separate image files are created in the export.

    Ungroup objects in blocks (DWG, DXF)

    Ungroup objects in shared cells (DGN)

    Export graphical objects as individual objects instead of blocks or shared cells. For example, a line, hatch and rectangle will be exported as a line object, hatch object and rectangle object, rather than blocks or shared cells. When this option is selected, the option Update Tekla Structures linework only is disabled.

    Include views outside the drawing frame Select whether to include in the export the drawing views that are located outside the drawing area.

    If you select this check box, the views that are outside the drawing area are included in the export.

    If you do not select this check box, the export excludes the drawing views that are outside the drawing area. By default, the check box is not selected.

    The views that are partially inside the drawing area are always exported by default.

    When the Include views outside the drawing frame check box is selected, the export preview is enlarged to show all included views.

    Drawing as snapshot to CAD model space

    Export the Tekla Structures drawing in scale to model space to a CAD file. Model and global coordinates and paper space/coordinate space switch in the layer/level settings will be ignored.

    If the drawing has linked or copied views, and you have not selected Drawing as snapshot to CAD model space, the drawing views may be placed on top of each other, and the view limits may not be accurate in the resulting file. This is because drawing views are not conceptually the same as paper space viewports in the DWG, DXF or DGN format.

    If you have shortened views in the drawing, and the objects are placed in 1:1 scale, the ends will be stretched to match the actual size of the part. Select Drawing as snapshot to CAD model space to avoid stretching of the shortened view in a CAD model space. The drawing space in a CAD software will keep the view shortening.

    Scale

    Define the scale for the exported DWG, DXF, or DGN. This option is only available if you have selected the Drawing as snapshot to CAD model space check box.

    For example, if you have a drawing between the coordinates 0,0 and 800, and you define a scale value 5, the resulting DWG is 5 times bigger, and the DWG is located between the coordinates 0,0 and 4000.

    In another example, if you have set the drawing view scale in Tekla Structures to 1:50, and wish to export the drawing in 1:1 scale, using 50 as the scale value will produce the desired result.

    If you have set the advanced option XS_EXPORT_DRAWING_TRY_TO_KEEP_LOCATION to TRUE, Tekla Structures tries to keep the DWG, DXF, or DGN origin in the same position as the drawing view origin. This can only be done in plan views and elevation views. If the drawing has more than one plan view or elevation view, Tekla Structures places the DWG, DXF, or DGN origin in the bottom-left corner of the drawing frame.

    For more information about defining the export scale, see "Drawing export scale factor for DWG/DXF".

  8. On the Layer rules (DWG, DXF) or Level rules (DGN) tab, you can define explicitly the layers or levels where different model and drawing objects, or parts of objects are exported to. For example, you can export outlines to a different layer or level than fills and hatches.

    You can also define whether the line color, style, and weight will be used from Tekla Structures settings or from the target layer or level settings specified in a DWG, DXF, or DGN file. If you select Tekla Structures settings, Tekla Structures line color, style, and weight stay exactly as you see them in the Tekla Structures drawing, and there is no functionality to modify them just for the drawing export.

  9. To use a template, use the Target layers from DWG (DWG, DXF) or Target levels from DGN (DGN) list to browse for the template file. If specified, the template is used for layer or level definition. The template should not contain any CAD objects, just layer or level settings, unless it contains objects that are intended to appear on drawings exported using this template. For example, for the DWG export, you could use your standard DWG file with all the predefined layers. The DGN export uses seed files as templates in the export. A seed file is a blank design file with the appropriate settings.

    You can enter .\ and then the file name, in which case Tekla Structures searches for the file first in the model, project and firm folders, then in the folder indicated by the advanced option XS_DRIVER, then in the system folder, and finally in the user settings folder.

    An error message is displayed next to the Browse... button until the template is found and loaded.

    The target layer or level boxes are briefly colored in yellow when a new template file is loaded. When there are no layers or levels available in the template file, the boxes are colored in red.

  10. Add the rules:
    • To add a new rule, click the Add button on the right, or copy the selected rule by clicking the Copy button.
    • To move the rules upwards or downwards in the set, click the Move up and Move down buttons. You can select multiple rules.
    • To delete a rule, select it and click Delete. You can delete multiple rules at a time.
  11. Define the rule contents:

    Objects

    Select the objects that you want to export.

    Some objects, like neighbor part marks, are currently under marks and not listed separately. To have them separated in the export, you need to use Object filtering, and create several mark rules for parts and neighbor parts.

    To include everything else that is missing from the Objects list, add an All object rule at the end of the rules list, because rules are read in the order they are listed.

    To export pours, you need to enable the pours in the model by setting the advanced option XS_ENABLE_POUR_MANAGEMENT to TRUE.

    Presentation filtering

    Define which part of the objects should follow the rule. You can also select All.

    The Presentation filtering options are different for different object types.

    You cannot add more than one filter per rule. For example, to have mark frames separated from mark text, you need to create two rules for marks, and in the first one, set the Presentation filtering to Text, and in the other one to Frames. See the section "DWG layer rule example" below for an example.

    Object filtering

    Read the selection filter attribute files that have been defined in the current model.

    The filter attribute files are only read from the current model folder, not from the firm or project folders.

    Target layer (DWG, DXF)

    Target level (DGN)

    If you have no templates, or want to create layers or levels of your own, type a new layer or level name in the Target layer or Target level box, or select a previously used layer or level from the list.

    After you have added a template, its layers or levels will appear in the Target layer or Target level list.

    The target layer or level boxes are briefly colored in yellow when a new template file is loaded. When there are no layers or levels available in the template, the boxes are colored in red.

    Color

    Line style

    Line weight

    Define whether the linework is taken from Tekla Structures settings or from the template.

    Paper space (DWG, DXF)

    Coordinate space (DGN)

    To draw drawing objects correctly in the paper space (DWG, DXF) or coordinate space (DGN) in the exported file (and not through the view portal), select the Paper space or Coordinate space check box.

    If this check box is not selected, there will only be a portal from the model space in the paper space or coordinate space.

    We recommend that you put drawing annotations, such as marks, dimensions, and texts to the paper space or coordinate space only. That way they will appear correctly, for example, when a part is cut in a Tekla Structures drawing view.

    Include

    To include a rule in the export, select the Include check box next to the rule on the left. If you do not want to export some objects, just clear the Include check box.

  12. To open the preview to check the result before exporting, click Open preview.
    To update the preview after changes, click Refresh preview.
  13. Click Export.

    The drawings are exported on the basis of the defined settings and rules. The rules are read in the order that they are listed. If you have selected Open folder when finished, the export folder will open.

    The error message Drawing cannot be read is displayed if the exported drawing is missing, the drawing is not up to date, or the drawing has some other problems.

    When you click the Export button, Tekla Structures first checks if the files can be written to before the export starts, and asks you to close the necessary applications. It also checks if the files already exist and asks if you want to overwrite the existing files.

DWG layer rule example

In the example below, three separate mark rules have been created that will be exported on layers 1, 2, and 3. Lines are exported on the layer 1, texts on the layer 2, and frames on the layer 3.

After exporting, you can show the marks in the CAD model in the following three ways depending on the layers displayed in the CAD viewer:

All layers are shown:

Layer 1 containing the lines is hidden:

Layer 2 containing the texts is hidden:

Layer 3 containing the frames is hidden:

Tips

  • If you use the Output file version 2013 in the export, a wipeout frame will be visible on the layout side in the CAD model due to the limitations in CAD, see below:

    To avoid this, either use a DWG file layer template created in AutoCAD, or use the output file version 2010 (default) or earlier.

  • Another reason for the visible wipeout frame is that you are using a DWG template where wipeout frames have been set visible. Hide the wipeout frames in the CAD template. For more information, see "Remove unwanted text frames from DWG exports".

To use old DWG or DXF drawing export

If you want to use the old DWG or DXF drawing export, set the advanced option XS_USE_OLD_DRAWING_EXPORT to TRUE in an .ini file. This advanced option is by default set to FALSE. For instructions on using the old export, see Export a drawing to a 2D DWG or DXF file (old export).

Was this helpful?
Previous
Next