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
<class 'AttributeError'>: module 'FreeCAD' has no attribute 'DraftWorkingPlane'
This commit is contained in:
Syres916
2019-05-02 19:51:47 +01:00
committed by Yorik van Havre
parent 222ae7305f
commit fad8fa4071

View File

@@ -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: