Accessing datatype of properties
Hi, developping a small scale IDS writer on python.
I use the bSDD database to have a list of the possible entities.
Then from bSDD I can retrieve all the properties and Psets from an entity (to allow the user to not having to go on internet, and copy pasting the specific pset he wants, without making a typing error). The problem is that these properties don't have the correct datatype ("String" instead of IfcLabel or any other).
I was wondering if it is possible to use the IfcOpenshell module (or any other tool), to retrieve this information (input : bSDD identifier of the property - output: datatype)
I don't want to download the IFC schema because it is not the aim to have the data in a folder.
Tagged:
Comments
Maybe
ifcopenshell.util.attribute.get_primitive_type
can help - https://github.com/IfcOpenShell/IfcOpenShell/blob/7a44f9e8a709a0be92ed235906677fd472c06223/src/ifcopenshell-python/ifcopenshell/util/attribute.py#L23-L55Example (more examples you can find in ifcopenshell codebase).
The ifcopenshell.util.pset utility also lets you grab pset templates and their data types.