diff --git a/src/blenderbim/blenderbim/bim/handler.py b/src/blenderbim/blenderbim/bim/handler.py index 6e4f64b880..bc3f805109 100644 --- a/src/blenderbim/blenderbim/bim/handler.py +++ b/src/blenderbim/blenderbim/bim/handler.py @@ -70,8 +70,7 @@ def purge_module_data(): @persistent def loadIfcStore(scene): - IfcStore.file = None - IfcStore.schema = None + IfcStore.purge() ifc_file = IfcStore.get_file() IfcStore.get_schema() [ diff --git a/src/blenderbim/blenderbim/bim/ifc.py b/src/blenderbim/blenderbim/bim/ifc.py index 7a5833a852..9e1e4ec54b 100644 --- a/src/blenderbim/blenderbim/bim/ifc.py +++ b/src/blenderbim/blenderbim/bim/ifc.py @@ -15,6 +15,19 @@ class IfcStore: library_path = "" library_file = None + @staticmethod + def purge(): + IfcStore.path = "" + IfcStore.file = None + IfcStore.schema = None + IfcStore.id_map = {} + IfcStore.guid_map = {} + IfcStore.edited_objs = set() + IfcStore.pset_template_path = "" + IfcStore.pset_template_file = None + IfcStore.library_path = "" + IfcStore.library_file = None + @staticmethod def get_file(): if IfcStore.file is None: