diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index f26ad941d7..f4d2a24e67 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -1098,7 +1098,14 @@ def export(exportList,filename): if ifctype in ["IfcSlab","IfcFooting","IfcRoof"]: args = args + ["NOTDEFINED"] elif ifctype in ["IfcWindow","IfcDoor"]: - args = args + [obj.Width.Value/1000.0, obj.Height.Value/1000.0] + if hasattr(obj,"Width") and hasattr(obj,"Height"): + args = args + [obj.Width.Value/1000.0, obj.Height.Value/1000.0] + else: + if obj.Shape.BoundBox.XLength > obj.Shape.BoundBox.YLength: + l = obj.Shape.BoundBox.XLength + else: + l = obj.Shape.BoundBox.YLength + args = args + [l/1000.0,obj.Shape.BoundBox.ZLength/1000.0] elif ifctype == "IfcSpace": args = args + ["ELEMENT","INTERNAL",obj.Shape.BoundBox.ZMin/1000.0] elif ifctype == "IfcBuildingElementProxy":