mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
check PredefinedType if exists not based on schema
This commit is contained in:
@@ -83,7 +83,7 @@ class entity(facet):
|
||||
|
||||
def __call__(self, inst, logger):
|
||||
# @nb with inheritance
|
||||
if self.predefinedtype and "4" in ifc_file.schema:
|
||||
if self.predefinedtype and hasattr(inst, "PredefinedType"):
|
||||
# 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})
|
||||
|
||||
Reference in New Issue
Block a user