diff --git a/src/ifcopenshell-python/ifcopenshell/validate.py b/src/ifcopenshell-python/ifcopenshell/validate.py index c47f916dc7..5a5801fc16 100644 --- a/src/ifcopenshell-python/ifcopenshell/validate.py +++ b/src/ifcopenshell-python/ifcopenshell/validate.py @@ -104,6 +104,13 @@ def validate(f, logger): logger.set_instance(inst) entity = schema.declaration_by_name(inst.is_a()) + + if entity.is_abstract(): + e = "Entity %s is abstract" % entity.name() + if hasattr(logger, 'set_instance'): + logger.error(e) + else: + logger.error('In {}\n{}'.format(inst, e)) for attr, val, is_derived in zip(entity.all_attributes(), inst, entity.derived()):