From fad8fa4071156d833ba856c41d5361744c53a2d5 Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Thu, 2 May 2019 19:51:47 +0100 Subject: [PATCH] importDXF draftWPlane Fix To fix error: w.Placement = placementFromDXFOCS(polyline) File "E:\Data\My Downloads\FreeCAD_0.19.16587_x64_Conda_Py3QT5-WinVS2015\FreeCAD_0.19.16587_x64_Conda_Py3QT5-WinVS2015\Mod\Draft\importDXF.py", line 422, in placementFromDXFOCS draftWPlane = FreeCAD.DraftWorkingPlane : module 'FreeCAD' has no attribute 'DraftWorkingPlane' --- src/Mod/Draft/importDXF.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index ccdc7f1487..4ac4621bf7 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -50,10 +50,14 @@ CURRENTDXFLIB = 1.40 # the minimal version of the dxfLibrary needed to run import six -import sys, FreeCAD, os, Part, math, re, string, Mesh, Draft, DraftVecUtils, DraftGeomUtils +import sys, FreeCAD, os, Part, math, re, string, Mesh, Draft, DraftVecUtils, DraftGeomUtils, WorkingPlane from Draft import _Dimension, _ViewProviderDimension from FreeCAD import Vector +# sets the default working plane +plane = WorkingPlane.plane() +FreeCAD.DraftWorkingPlane = plane + gui = FreeCAD.GuiUp draftui = None if gui: