Convert NC files to DXF

Tekla Structures
Not version-specific
Tekla Structures
DXF
convert
NC files
Environment
Netherlands
Construsoft European
Spain

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 usedScribing information included
File dstv2dxf.bat

(stored in folder C:\TeklaStructures\<version>\nt\dstv2dxf)
YesNo
Macro CS DSTV to DXFDXF

(in the Applications and components database)
YesNo
Extension DSTVtoDXFConverter

(in Tekla Warehouse)
NoYes

 

Step plan

1. Go to File > Export > NC-files to create NC files for the plates.
2. Load the setting DSTV2DXF in the NC File Header Information dialog box to have correct output in DXF files:

Image
2018-06-14_10-47-06.png


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 macro "cs dstv":

Image
2018-06-14_14-02-46.png


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 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_SECTIONSpecify 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_OUTFILEUse 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_CROSSHAIRSDraw crosshair for holes and slotted holes.

Options: HOLES, LONG_HOLES, BOTH or NONE - Default value: NONE
 
HOLES
Image
2018-06-14_15-14-55.png
LONG_HOLES
Image
2018-06-14_15-15-35.png
BOTH
Image
2018-06-14_15-16-15.png
NONE
Image
2018-06-14_15-16-56.png
SIDE_TO_CONVERTDefines 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:

Image
ak_blok.png


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 to TRUE to also include the outer contour of the back side (= hinten) of the plates in the NC file:

Image
ak_blok2.png


You can now also convert the back side to dxf.
 
The extension DSTVtoDXFConverter provides in this by default.
OUTPUT_CONTOURS_ASConvert contours as polylines or lines and arcs.
Options: POLYLINES or LINES_ARCS - Default value: POLYLINES
CONTOUR_DIRECTIONDefine 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_POLYLINESConvert holes to polylines.

Options: TRUE or FALSE - Default value: FALSE
MAX_HOLE_DIAMETER_TO_POINTSConvert small holes to points in the DXF file.

Options: - Default value: 4.99
HOLE_POINT_STYLE & HOLE_POINT_SIZEPoint style and size for holes.

Options: - Default value: resp. 33 and 1 (do not change)
SCALE_DSTV_BYScale 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_ROUNDINGSAdd holes to roundings.

Options: TRUE or FALSE - Default value: FALSE
MIN_MATL_BETWEEN_HOLESDefine how close the holes can be to each other in slotted hole conversion.
Options: - Default value: 2.0
INPUT_FILE_DIR & OUTPUT_FILE_DIRFolders for input and output files.
DEBUGShow 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_OPTIONSDefine 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:
 
Image
2018-06-14_16-07-17.png
TEXT_POSITION_X & TEXT_POSITION_YThe 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:

 
Image
2016_12_22_15_41_297.png
TEXT_HEIGHTText height can be changed by using the line: DSTV2DXF_TEXT_SIZE=5
TEXT_WIDTH_RATIODefine 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_CHARBy 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.
 
Image
2016_12_22_15_41_588.png


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

 

 

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]
 
Image
2018-06-15_08-40-23.png
 
Image
2018-06-15_08-42-55.png

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

 PHANTOM_OUTLINEPHANTOM_ARROWPHANTOM_BOTHPHANTOM_NONE
Type 1
Image
PHANTOM_OUTLINE_type1.png
Image
PHANTOM_ARROW_type1.png
Image
PHANTOM_BOTH_type1.png
Image
PHANTOM_NONE_type1.png
Type 2
Image
PHANTOM_OUTLINE_type2.png
Image
PHANTOM_ARROW_type2.png
Image
PHANTOM_BOTH_type2.png
Image
PHANTOM_NONE_type2.png
Type 3
Image
PHANTOM_OUTLINE_type3.png
Image
PHANTOM_ARROW_type3.png
Image
PHANTOM_BOTH_type3.png
Image
PHANTOM_NONE_type3.png
Type 4
Image
PHANTOM_OUTLINE_type4.png
Image
PHANTOM_ARROW_type4.png
Image
PHANTOM_BOTH_type4.png
Image
PHANTOM_NONE_type4.png
Type 5
Image
PHANTOM_OUTLINE_type5.png
Image
PHANTOM_ARROW_type5.png
Image
PHANTOM_BOTH_type5.png
Image
PHANTOM_NONE_type5.png
Type 6
Image
PHANTOM_OUTLINE_type6.png
Image
PHANTOM_ARROW_type6.png
Image
PHANTOM_BOTH_type6.png
Image
PHANTOM_NONE_type6.png
Type 7
Image
PHANTOM_OUTLINE_type7.png


2 layers are created for the slotted holes.
Image
PHANTOM_ARROW_type7.png


1 layer is created for the slotted holes.
Image
PHANTOM_BOTH_type7.png


2 layers slotted holes are created.
Image
PHANTOM_NONE_type7.png


1 layer for the slotted holes is created.
Was this helpful?