DXF file does not open in AutoCAD

273 views Asked by At

When I have such code with HEADER it does not work

0
SECTION
2
HEADER
0
ENDSEC
0
SECTION
2
ENTITIES
0
LINE
8
1.0
39
1.0
10
0.0
20
0.0
11
0.0
21
4.5
0
LINE
8
1.0
39
1.0
10
0.0
20
4.5
11
2.5
21
4.5
0
LINE
8
1.0
39
1.0
10
2.5
20
4.5
11
2.5
21
0.0
0
LINE
8
1.0
39
1.0
10
0.0
20
0.0
11
2.5
21
0.0
0
LINE
8
1.0
39
1.0
10
0.0
20
3.0
11
2.5
21
3.0
0
LINE
8
1.0
39
1.0
10
0.0
20
0.42857142857142855
11
2.5
21
0.42857142857142855
0
LINE
8
1.0
39
1.0
10
0.0
20
0.8571428571428571
11
2.5
21
0.8571428571428571
0
LINE
8
1.0
39
1.0
10
0.0
20
1.2857142857142856
11
2.5
21
1.2857142857142856
0
LINE
8
1.0
39
1.0
10
0.0
20
1.7142857142857142
11
2.5
21
1.7142857142857142
0
LINE
8
1.0
39
1.0
10
0.0
20
2.142857142857143
11
2.5
21
2.142857142857143
0
LINE
8
1.0
39
1.0
10
0.0
20
2.571428571428571
11
2.5
21
2.571428571428571
0
LINE
8
1.0
39
1.0
10
1.25
20
0.0
11
1.25
21
3.0
0
DIMENSION
8
1
  2
*D1
10
-1
20
3
30
0
11
-1
21
1.5
 31
0.0
 70
0
 13
0.0
 23
0.0
 33
0.0
 14
0.0
 24
3
50
90
0
ENDSEC
0
EOF

But when I remove:

0
SECTION
2
HEADER
0
ENDSEC

It everything is ok.

I need HEADER to change the font size in the dimensions ......................................................................................................

1

There are 1 answers

0
mozman On

The DIMENSION entity at the end of the ENTITY section contains a reference DXF code (2, *D1) - name of pseudo-Block containing the current dimension entity geometry - which do not exist in the DXF file.

  1. If you delete the DIMENSION entity, AutoCAD opens the DXF file.

  2. Or you can delete the HEADER section, which creates a special case of valid DXF R12 file.

  3. Or you create the required *D1 block inside of the BLOCKS section. If you want to know how this BLOCK definition looks like, just save the DXF file without the HEADER section (see 2.) as DXF R12 file from AutoCAD. In the new file the BLOCK name is *D0, and it is really complicated to create this dimensions blocks.