KiCad generated dxf files missing ACADVER entry?

When I try to import a .dxf sourced from KiCad into FreeCad (via Kicad StepUp or natively), FreeCad complains about the ACAD version and won’t load it. If I run the .dxf in/out through another tool (like InkScape), then the .dxf will go into FreeCad AOK.

Looking into the difference, I find the .dxf that go in AOK have header $ACADVER and the Kicad .dxf doesn’t. If I just edit the Kicad sourced file to include the $ACADVER entry, then all is well.

0
SECTION
2
HEADER
9
$ACADVER
1

Works for me™


Which FreeCAD version?
0.21.2 is the current release

I was running FreeCad 0.21.1 With Kicad V7.0.10. I also tried KiCad V8 RC2 from a few weeks ago with the same result.

Here’s what FreeCad says:
18:49:54 There has been an error:
18:49:54 Unable to identify DXF file version

If I edit the dxf from Kicad to add:
$ACADVER
1

then FreeCad imports it AOK. I’ll upgrade FreeCad to 0.21.2 and report back.

Edit: I tried FreeCad 0.21.2 and I get the same result:
19:16:05 There has been an error:
19:16:05 Unable to identify DXF file version

Wondering why it works for others, I poked around a bit in FreeCad Import/Export preferences and found that if I uncheck the default “Use legacy python importer” then it seems to work fine. It looks like its the legacy python importer in FreeCad that has a problem with Kicad dxf not having an entry for ACADVER.

Thanks for all of your help in helping me not having to edit dxf files from Kicad.

1 Like

A known issue that should be solved with upgrading legacy imported

1 Like

Thanks again and my apologies for not finding this as a known issue. Indeed replacing the dxfReader.py FreeCad file with the latest one from ~5 months ago resolves the issue with “somewhat non-standard” .dxf files.

https://github.com/yorikvanhavre/Draft-dxf-importer/pull/26/files

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.