DXF file - will not open in Autodesk Viewer

We are building a DXF exporter and from what I read, this extremely simple file should be valid. We do not have any CAD testing tools, so I am very limited in my debugging capabilities. This opens in the Proficad online browser , but I get an error from the Autodesk viewer saying: "The drawing file is invalid and cannot be viewed."

This is the whole file. Any help is appreciated!

  0
SECTION
  2
ENTITIES
  0
LWPOLYLINE
  90
5
  70
0
  43
0.0
  10
-8.75
  20
-11.75
  30
0.0
  10
-8.75
  20
11.75
  30
0.0
  10
8.75
  20
11.75
  30
0.0
  10
8.75
  20
-11.75
  30
0.0
  10
-8.75
  20
-11.75
  30
0.0
  0
ENDSEC 
  0
EOF
+4
source share
4 answers

A couple of problems with your DXF file.

  • LWPOLYLINE . TABLES, AcDbEntity AcDbPolyline. . POLYLINE .

  • HEADER AutoCAD, DXF. HEADER, .

DXF ( R12), AutoCAD:

  0
SECTION
  2
HEADER
  9
$ACADVER
  1
AC1009
  0
ENDSEC
  0
SECTION
  2
ENTITIES
  0
POLYLINE
  5
7C
  8
0
 66
     1
 10
0.0
 20
0.0
 30
0.0
  0
VERTEX
  5
174
  8
0
 10
-8.75
 20
-11.75
 30
0.0
  0
VERTEX
  5
175
  8
0
 10
-17.5
 20
0.0
 30
0.0
  0
VERTEX
  5
176
  8
0
 10
-8.75
 20
11.75
 30
0.0
  0
VERTEX
  5
177
  8
0
 10
0.0
 20
0.0
 30
0.0
  0
VERTEX
  5
178
  8
0
 10
-8.75
 20
-11.75
 30
0.0
  0
SEQEND
  5
179
  8
0
  0
ENDSEC
  0
EOF

, , . , DXF ( ).

  0
 POLYLINE
   5
 7C

5 , ( ). 7C - . , , .

+3

DXF Autodesk (PDF ), LWPOLYLINE 2D-; , 10 20, 30, 30 0.0, . , LWPOLYLINE Z, , 38 () 10.

Z , POLYLINE VERTEX, SEQEND.

EDIT: DXF , , Autodesk , .

+2

, LWPOLYLINE 2D...

: AutoCAD , , DXF, , , .

+1

Well, your question is specific to a specific problem with the DXF data format, which is missing / adds some values ​​that AutoCad is unhappy with. Your best chance to solve this is to try to create a similar file from AutoCad and compare what you might have missed / added incorrectly. It is very difficult for others to debug you in this situation. I saw the DXF specification pdfs from Autocad, there are some DXF help file entries at the bottom, refer to them too.

0
source

Source: https://habr.com/ru/post/1589281/


All Articles