关于Forge Derivative API提取IFC模型元数据属性值为数组的疑问
Understanding Array-Valued Properties in Forge Derivative API's IFC Metadata
Hey there! Let me walk you through what's going on with those array-valued properties you're seeing, based on my hands-on experience with the Forge Derivative API and IFC data handling:
This is neither an API bug nor a problem with the Urban_House.ifc model — it’s actually normal behavior rooted in IFC’s data structure and how different tools interpret it.
- The IFC standard allows certain properties to have multiple values (for example, classification attributes or object type tags that might be assigned multiple categories). The Forge Derivative API returns raw, unprocessed parsed data from the IFC file, preserving these array structures exactly as they exist in the source.
- Autodesk’s IFC viewer (like the Forge Viewer) simplifies this for end-users: it automatically concatenates array values into a single human-readable string (e.g., joining elements with commas), which is why you only see plain strings there instead of arrays.
Your current workaround is totally valid
- Checking if a property value is an array and handling it accordingly (like joining elements into a string or extracting specific values) is a recommended approach. Since IFC models can vary in how properties are structured, having access to the raw array data gives you flexibility to handle edge cases that the viewer hides for simplicity.
Quick verification tip
- Grab an open-source IFC parsing tool like IfcOpenShell, load the Urban_House.ifc file directly, and inspect the raw property data. You’ll see that those "array" properties are actually stored as multi-value attributes in the original IFC file — the Derivative API is just being faithful to the source data.
内容的提问来源于stack exchange,提问作者Félix C
相关产品推荐
相关产品推荐

