MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_category

Function get_category

src/ifcfm/ifcfm/cobie24.py:1045–1060  ·  view source on GitHub ↗
(element: ifcopenshell.entity_instance)

Source from the content-addressed store, hash-verified

1043
1044
1045def get_category(element: ifcopenshell.entity_instance) -> Union[str, None]:
1046 references = list(ifcopenshell.util.classification.get_references(element))
1047 results = []
1048 for reference in references:
1049 if reference.is_a("IfcClassification"):
1050 continue
1051 elif reference.is_a("IfcClassificationReference"):
1052 identification = val(getattr(reference, "Identification", getattr(reference, "ItemReference", None)))
1053 if val(reference.Name) and identification and val(reference.Name) != identification:
1054 results.append(identification + " : " + val(reference.Name))
1055 elif val(reference.Name):
1056 results.append(reference.Name)
1057 elif identification:
1058 results.append(identification)
1059 if results:
1060 return ",".join(results)
1061
1062
1063def get_pao_address(

Callers 8

get_attributesFunction · 0.70
get_facility_dataFunction · 0.70
get_floor_dataFunction · 0.70
get_space_dataFunction · 0.70
get_zone_dataFunction · 0.70
get_type_dataFunction · 0.70
get_system_dataFunction · 0.70
get_spare_dataFunction · 0.70

Calls 5

valFunction · 0.70
get_referencesMethod · 0.45
is_aMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected