(element: ifcopenshell.entity_instance)
| 1043 | |
| 1044 | |
| 1045 | def 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 | |
| 1063 | def get_pao_address( |
no test coverage detected