diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 6db6e598c..211c4e1f0 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -1009,6 +1009,9 @@ def addToBlock(obj,layer): def processdxf(document,filename,getShapes=False): "this does the translation of the dxf contents into FreeCAD Part objects" global drawing # for debugging - so drawing is still accessible to python after the script ran + if not dxfReader: + getDXFlibs() + readPreferences() FreeCAD.Console.PrintMessage("opening "+filename+"...\n") drawing = dxfReader.readDXF(filename) global layers