def step_impl(context, ifc_class, property_path, pattern): import re pset_name, property_name = property_path.split('.') elements = IfcFile.get().by_type(ifc_class) for element in elements: prop = IfcFile.get_property(element, pset_name, property_name) if not prop: assert False # For now, we only check single values if prop.is_a('IfcPropertySingleValue'): if not (prop.NominalValue \ and re.search(pattern, prop.NominalValue.wrappedValue)): assert False
def step_impl(context, ifc_class, property_path): pset_name, property_name = property_path.split(".") elements = IfcFile.get().by_type(ifc_class) for element in elements: if not IfcFile.get_property(element, pset_name, property_name): assert False