autocadautodeskcaddxf

DXF - AUTOCAD cant open DXF file with text Entity


I'm trying to write some DXF files manually using VBA, the ideia is to create a macro that transform a list of names in text in DXF.The first files i just ploted a simple line and it opens just fine in Autocad but as soon i insert an text entity it doesnt work anymore, i read a lot of documentation , tried some solutions presented here in the forum but dont have a clue what is going on, can someone cast some ligth on this?

this is the code that i used:

0
SECTION
  2
HEADER
  9
$ACADVER
  1
AC1009
  0
ENDSEC
  0
SECTION
  2
TABLES
  0
TABLE
  2
STYLE
70
1
  0
STYLE
  2
ARIAL
70
0
40
0.0
41
1.0
50
0.0
71
0
 42
2.5
  3
arial.shx
4
0
  0
ENDTAB
  0
ENDSEC
  0
SECTION
  2
ENTITIES
  0
TEXT
5
C1
1
Test
8
0
10
12
20
12
40
14.0
41
1
7
ARIAL
370
122
  0
ENDSEC
  0
EOF

I tried to change the font to romans or standart and didnt work, i want to plot text that can be opened in AutoCad with no problems.I Read some questions on the forum but none of the aswers worked i need some examples...


Solution

  • The TEXT entity contains an invalid tag with group code 370 - Autodesk TrueView also reports this:

    Undefined group code 370 for object on line 68.
    Invalid or incomplete DXF input -- drawing discarded.
    

    Delete the lines containing 370 and 122 and the file will open in TrueView or AutoCAD.