Hi
I have two questions regarding the attached IFC file.
- How to extract all the property sets from IFC file?
The code I tried is
import ifcopenshell.util
import ifcopenshell.util.element
ifc_file = ifcopenshell.open(input file)
products = ifc_file.by_type('IfcFlowSegment')[0]
line1= ifcopenshell.util.element.get_psets(products)
print (line1)
The output
{'12d Model': {'Geometry': {'id': 60, 'type': 'IfcComplexProperty', 'Name': 'Geometry', 'Description': '12d_attribute_group', 'UsageName': None, 'properties': {'Justification': 'Obvert', 'Start x': 51931.177, 'Start y': 158115.545, 'Start z': 3.403, 'End x': 51923.207, 'End y': 158110.611, 'End z': 3.656}}, 'PUP': {'id': 68, 'type': 'IfcComplexProperty', 'Name': 'PUP', 'Description': '12d_attribute_group', 'UsageName': None, 'properties': {'ID': 'SBCP-L181120-00011025', 'Owner': 'BCC', 'Description': 'PIPE', 'Creator': 'B+B', 'Creation Date': '20181126', 'Creation Source': 'SURVEY', 'AS 4588 Quality': 'B', 'Comment': 'nc', 'Material': 'STEEL'}}, 'Label': {'id': 78, 'type': 'IfcComplexProperty', 'Name': 'Label', 'Description': '12d_attribute_group', 'UsageName': None, 'properties': {'PipeSize': 'Ø100'}}}}
How can I Iterate so that all the property sets are extracted?
- How can I get the properties in the above output into a dataframe?