From ea97b43499b8d00a9bd71d096c003b4c02c6326f Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 19 Aug 2019 09:11:50 +0200 Subject: [PATCH] Arch: workaround to make Arch loading without errors, but still this needs to be fixed --- src/Mod/Arch/ArchIFCSchema.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Mod/Arch/ArchIFCSchema.py b/src/Mod/Arch/ArchIFCSchema.py index 33d971d8ab..b6486544df 100644 --- a/src/Mod/Arch/ArchIFCSchema.py +++ b/src/Mod/Arch/ArchIFCSchema.py @@ -3,9 +3,20 @@ import FreeCAD, os, json ifcVersions = ["IFC4", "IFC2X3"] IfcVersion = ifcVersions[FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("IfcVersion",0)] +# BEGIN FIXME +# the file ifc_contexts_IFC2x3.json is missing at all in sources +# All Arch module is broken if pref is set to IFC2x3 +# we will use the IFC4 one instead, to get back the Arch module +# Still lots of stuff does not work, but at least the Arch loads +''' with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets", "ifc_contexts_" + IfcVersion + ".json")) as f: IfcContexts = json.load(f) +''' +with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets", +"ifc_contexts_" + "IFC4" + ".json")) as f: + IfcContexts = json.load(f) +# END FIXME with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets", "ifc_products_" + IfcVersion + ".json")) as f: