From 2e0d5fa707392441d340de5f02cb9e10d5903418 Mon Sep 17 00:00:00 2001 From: atom3 Date: Thu, 29 Apr 2021 23:41:22 +0200 Subject: [PATCH] skip PredefinedType if not IFC4 --- src/ifcopenshell-python/ifcopenshell/ids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/ids.py b/src/ifcopenshell-python/ifcopenshell/ids.py index 2185151236..eaa4537808 100644 --- a/src/ifcopenshell-python/ifcopenshell/ids.py +++ b/src/ifcopenshell-python/ifcopenshell/ids.py @@ -84,7 +84,7 @@ class entity(facet): def __call__(self, inst, logger): # @nb with inheritance - if self.predefinedtype: + if self.predefinedtype and "4" in ifc_file.schema: # logger.debug("Testing if entity predefinedtype '%s' == '%s'", inst.PredefinedType, self.predefinedtype) self.message = "an entity name '%(name)s' of predefined type '%(predefinedtype)s'" return facet_evaluation(inst.is_a(self.name) and inst.PredefinedType == self.predefinedtype, self.message % {"name": inst.is_a(), "predefinedtype": inst.PredefinedType})