(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance)
| 147 | |
| 148 | |
| 149 | def get_element_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
| 150 | space = ifcopenshell.util.element.get_container(element) |
| 151 | space_name = space.Name if space.is_a("IfcSpace") else None |
| 152 | systems = ifcopenshell.util.system.get_element_systems(element) |
| 153 | system = systems[0].Name if systems else None |
| 154 | psets = ifcopenshell.util.element.get_psets(element) |
| 155 | return { |
| 156 | "Name": element.Name, |
| 157 | "TypeName": ifcopenshell.util.element.get_type(element).Name, |
| 158 | "SpaceName": space_name, |
| 159 | "SystemName": system, |
| 160 | "OrganizationName": get_owner_name(element), |
| 161 | "CreationDate": get_owner_creation_date(element), |
| 162 | "ModelSoftware": get_owner_application(element), |
| 163 | "ModelObject": "{}[{}]".format(element.is_a(), ifcopenshell.util.element.get_predefined_type(element)), |
| 164 | "ModelID": element.GlobalId, |
| 165 | "ModelTag": element.Tag, |
| 166 | "SerialNumber": get_property(psets, "Pset_ManufacturerOccurrence", "SerialNumber"), |
| 167 | "BarCode": get_property(psets, "Pset_ManufacturerOccurrence", "BarCode"), |
| 168 | "BatchReference": get_property(psets, "Pset_ManufacturerOccurrence", "BatchReference"), |
| 169 | "TagNumber": get_property(psets, "Pset_ConstructionOccurrence", "TagNumber"), |
| 170 | "AssetIdentifier": get_property(psets, "Pset_ConstructionOccurrence", "AssetIdentifier"), |
| 171 | "InstallationDate": get_property(psets, "Pset_ConstructionOccurrence", "InstallationDate"), |
| 172 | "WarrantyStartDate": get_property(psets, "Pset_Warranty", "WarrantyStartDate"), |
| 173 | } |
| 174 | |
| 175 | |
| 176 | def get_system_data(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) -> dict[str, Any]: |
no test coverage detected