Convert NC files to DXF


Software version: Not version-specific

Last updated September 4, 2020 by Construsoft NL ts-support@construsoft.com

Environment: 
Netherlands
Netherlands enu
Spain

Convert NC files to DXF

In Tekla Structures you can convert NC files to DXF files to drive plasma cutters and other cutting devices. In the converted DXF files, all superfluous information, such as dimension lines, are removed. Only the profile (cutting) contour and the position of the holes and text which can be adjusted is included in the DXF file. The DXF file contains only one side of the profile. Maintaining scribing information depends on the conversion tool you use.

For converting NC files to DXF files, you can use the following tools:
 

  File Construsoft.def is used Scribing information included
File dstv2dxf.bat

(stored in folder C:\TeklaStructures\<version>\nt\dstv2dxf)

Yes No
Macro CS DSTV to DXFDXF

(in the Applications and components database)

Yes No
Extension DSTVtoDXFConverter

(in Tekla Warehouse)

No Yes

 

Step plan

1. Go to File > Export > NC-files to create NC files for the plates.
2. Load the setting DSTV2DXF in the NC Filefile that contains information gathered from a model and exported to computer numerical controlled fabrication machinery

Tekla Structures produces NC files in several formats, for example, DSTV.

Header Information
dialog box to have correct output in DXF files:

When you load the setting DSTV2DXF, the position of the elements Phase identification and Drawing identification is correct.

3. Go to the database Applications and components and search for macrosaved series of actions that includes instructions for a program

Macros are located in the applications and components catalog. They are recorded or created manually and stored as .cs file in a folder defined with the advanced option XS_MACRO_DIRECTORY.

Macros can, for example, be used for creating drawings or reports.

Macros are sometimes used to run an application.

"cs dstv":

4. Double-click the macro, a browser opens.
5 Browse for the location of the NC files in the Tekla Structures model, next select the NC files.
6. Click Open, the NC files are converted to DXF files and stored in the subfolder NC_dxf in the model folderfolder that is used for storing files associated with a model

Tekla Structures stores all files associated with a model in a folder it creates with the same name as the model database (.db1).

In multi-user mode all users access the same model folder.

. The created NC files have file extension *.nc1 by default.

Settings in the file construsoft.def

The file construsoft.def contains a lot of settings, these can be defined by the user, such as the colors and layers for plates and holes in the DXF file and the height and color of the text. The file construsoft.def is stored in the folder ..:\TeklaStructures\<version>\nt\dstv2dxf and you can open it with any text editor.

Environment settings

The file construsoft.def includes lines under [ENVIRONMENT] to affect the DXF output file.
 
INCLUDE_SHOP_DATA_SECTION Specify whether to include a special data section in the DXF file to allow the DXF file to be better imported into CNC software written by Shop Data Systems. Including this special data section in the DXF file makes the DXF file unreadable by AutoCAD.

Options: TRUE or FALSE - Default value: FALSE

NO_INFILE_EXT_IN_OUTFILE Use to add the input file extension to the output file.
TRUE: P2.nc1 will become P2.dxf.
FALSE: P2.nc1 will become P2.nc1.dxf.

Options: TRUE or FALSE - Default value: FALSE

DRAW_CROSSHAIRS Draw crosshair for holes and slotted holes.

Options: HOLES, LONG_HOLES, BOTH or NONE - Default value: NONE
 

HOLES
LONG_HOLES
BOTH
NONE
SIDE_TO_CONVERT Defines the part face which is shown from the *.dxf file. The part face can only be created from one side. Therefore, this converter is best suited for plates, but it can create a *.dxf file from one part face of a beam.
Options: FRONT, TOP, BACK or BELOW - Default value: FRONT

When generating NC files, the AK block (= AußenKontur) in the NC file, by default only contains the front side (= vorne) of the outer contour:

To convert the back side via the file dstv2dxf.bat, the outer contour is missing by default.
Set the advanced option XS_DSTV_WRITE_BEHIND_FACE_FOR_PLATE(1) part that represents a flat structure

(1) In some contexts, for example in analysis, the term plate object may be used to refer to plates.

(2) plate that represents a steel structure

(2) Plate is mainly used as a connection piece or as a floor plate.

to TRUE to also include the outer contour of the back side (= hinten) of the plates in the NC file:

You can now also convert the back side to dxf.
 
The extension DSTVtoDXFConverter provides in this by default.

OUTPUT_CONTOURS_AS Convert contours as polylines or lines and arcs.
Options: POLYLINES or LINES_ARCS - Default value: POLYLINES
CONTOUR_DIRECTION Define the contour direction. This option changes the coordinates of the vertices, and the order they are written. You can see the difference if you open the DXF file in a text editor: "reverse" is clockwise and "forward" is counter-clockwise.

Options: REVERSE or FORWARD - Default value: REVERSE

CONVERT_HOLES_TO_POLYLINES Convert holes to polylines.

Options: TRUE or FALSE - Default value: FALSE

MAX_HOLEsmall hollow open throughout a part or assembly that is usually used for fastening parts with bolts or other such objects

Hole is created in the same way as bolts and hole properties are defined in the bolt properties.

_DIAMETER_TO_POINTS
Convert small holes to points in the DXF file.

Options: - Default value: 4.99

HOLE_POINT_STYLE & HOLE_POINT_SIZE Point style and size for holes.

Options: - Default value: resp. 33 and 1 (do not change)

SCALE_DSTV_BY Scale to imperial or metric units. Use 0.03937 to scale to imperial units, use 1.0 to scale to metric units.

Default value: 1

ADD_OUTER_CONTOUR_ROUNDINGS Add holes to roundings.

Options: TRUE or FALSE - Default value: FALSE

MIN_MATL_BETWEEN_HOLES Define how close the holes can be to each other in slotted hole conversion.
Options: - Default value: 2.0
INPUT_FILE_DIR & OUTPUT_FILE_DIR Folders for input and output files.
DEBUG Show data processing in the DOS window.
Options: TRUE or FALSE - Default value: FALSE

Text settings

The file construsoft.def includes lines under [TEXT_SPECS] to affect the DXF output file.
 
TEXT_OPTIONS Define the text options that you want to use in the DXF file:
  • P = Part mark
  • Q = Quantity
  • D = Profile description
  • T = Thickness
  • S = Side mark
  • B = Part mark + side mark
  • G = Grade

The text option is set to PQTG (Part mark, Quantity, Thickness and Grade) by default, this results in the following:
 

TEXT_POSITION_X & TEXT_POSITION_Y The X/Y location of lower-left corner of first line of text from the origin point <0,0> of the DXF file:
  • TEXT_POSITION_X=20.0
  • TEXT_POSITION_Y=50.0

The origin is in the following position:

 

TEXT_HEIGHT Text height can be changed by using the line: DSTV2DXF_TEXT_SIZE=5
TEXT_WIDTH_RATIO Define the text height ratio. Default value=1.0.
PART_MARK_PREFIX
SIDE_MARK_PREFIX
STEEL_QUALITY_PREFIX
QUANTITY_PREFIX
THICKNESS_PREFIX
DESCRIPTION_PREFIX
You can define several different prefixes for text items, such as ‘Part mark’, ‘Thickness’, etc.
CONCATENATE_TEXT & CONCATENATE_CHAR By using the line DSTV2DXF_CONCATENATE_TEXT you can concatenate text items. You can use the following values:
  • =0 : Text lines are not combined. Prefixes work only with this option.
  • =1 : Part mark text on one line, other texts combined on another line.
  • =2 : All text on one line.

 

The line CONCATENATE_CHAR=+ defines a separator of max 19 characters for the text items.
 
 

 

Colors and layers

Use the options in [MISC_LAYERS] to define names and colors for the different parts in the DXF file.

You can for example define the outer contour, the inner contour and texts. The defined numbers for the colors correspond with the Autocad colors (1=red, 2=yellow, 3=green, 4=cyan, 5=blue, 6=magenta, 7=white, 8=dark grey, 9=light grey). Use [HOLE_LAYERS] and [SLOT_LAYERS] to define the layers and colors per diameter for the holes and slotted holes.
 

[HOLE_LAYERS] [SLOT_LAYERS]
   

You can define the following options for slotted holes (default is type 7 - PHANTOM_NONE to create 1 layer for the slotted holes):

  PHANTOM_OUTLINE PHANTOM_ARROW PHANTOM_BOTH PHANTOM_NONE
Type 1
Type 2
Type 3
Type 4
Type 5
Type 6
Type 7

2 layers are created for the slotted holes.

1 layer is created for the slotted holes.

2 layers slotted holes are created.

1 layer for the slotted holes is created.

Tags: 
DXF
convert
NC files

Quick feedback

The feedback you give here is not visible to other users. We use your comments to improve our content.
We use this to prevent automated spam submissions.
Content rating: 
Average page rating: 4 (1 vote)
Refresh page after voting to show updated result.