DXF import error

Bug #1724720 reported by elecman
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

Importing DXF which is exported from Autodesk Inventor 2017 fails.

To reproduce:
-Open Inkscape 0.92.2
-Select File->Open and select the attached file Drawing1.dxf
-On the input settings, select manual scale = 1
-Select OK.
-An error dialog is shown with an error message which start with:
ERROR:root:code for hash md5 was not found.

Side note:
I was able to import it without an error at some point (not sure what I did) but it did not show any shapes or paths at all.

Tags: dxf
Revision history for this message
elecman (bitbarrelmedia) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

running Windows 10, Inkscape 0.92.2 (5c3e80d, 2017-08-06), I get the following Python error message:

Traceback (most recent call last):
  File "dxf_input.py", line 530, in <module>
    inkex.errormsg(_('%d ENTITIES of type POLYLINE encountered and ignored. Please try to convert to Release 13 format using QCad.') % polylines)
NameError: name '_' is not defined

This is a two-part problem. The first part, name '_' is not defined, can be fixed by inserting the statement:
inkex.localize()
into line 530 in file dxf_input.py.

with this change, the following Python output is obtained:
7 ENTITIES of type POLYLINE encountered and ignored. Please try to convert to Release 13 format using QCad.

The second part of the problem is that this module does not support pre-Release 13 features like POLYLINE.
To convert this to Release 13, load this into QCad 3.15 and save it to get the attached dxf file. This file appears to load normally into Inkscape, as far as I can tell.

Revision history for this message
elecman (bitbarrelmedia) wrote :

When I export the dxf from Inventor as the AutoCAD 2013 DXF version, I still get this error:

Traceback (most recent call last):
  File "dxf_input.py", line 530, in <module>
    inkex.errormsg(_('%d ENTITIES of type POLYLINE encountered and ignored. Please try to convert to Release 13 format using QCad.') % polylines)
NameError: name '_' is not defined

It would be nice if this is fixed instead of running the file through a different program.

Alvin Penner (apenner)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
elecman (bitbarrelmedia) wrote :

Just for reference in case someone has the same issue. A workaround is to export a PDF from Inventor and import that into Inkscape. You need to un-group it a few times in order to access individual paths.

Revision history for this message
TylerDurden (8thrule) wrote :

Duplicate of https://bugs.launchpad.net/inkscape/+bug/1683063 ?

Conversion of inventor dxf to Inkscape compatible version can also be accomplished with LibreCad:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=32212&p=97983&#p97983

TD

Revision history for this message
D du Toit (pvt-wilco) wrote :

Hi

I found if you tick the "model Geometry only box" in options second page when selecting Export destination you can import your model into inkscape. if you just need the model from a drawing

good luck

Revision history for this message
ubundominic (dominic-edmonds) wrote :

Same here with a DXF from Vectorworks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.