Autodesk BIM360 IFC单位转换与API属性数据精度问题咨询
Great question—this is a common pain point when working with formatted property data from BIM 360. Let’s break down how you can get the precise values you need for accurate unit conversions:
1. Grab Raw Values from the API Response
The key here is that the :urn/metadata/:guid/properties endpoint returns two versions of each numerical property:
- The
displayValue(what you’re seeing as2.871 ft) is rounded for readability in the UI. - The
valuefield holds the unprocessed, exact numerical value matching what you see in the BIM 360 web interface (e.g.,2.8707349081364826).
Here’s a snippet of what that might look like in the JSON response:
{ "properties": { "Dimensions": { "Height": { "value": 2.8707349081364826, "displayValue": "2.871 ft", "unit": "ft" } } } }
Use the value field directly for your unit conversion, and you’ll get the exact 875mm result you’re expecting.
2. Confirm Model Unit Context
To avoid any conversion missteps, double-check the model’s native units using the GET :urn/metadata endpoint. This will tell you if the model is using imperial (feet) or metric units, ensuring your conversion factor (304.8 for ft → mm) is correct for the source data.
3. Custom IFC Processing as a Backup
Since Autodesk isn’t addressing the IFC export unit issue soon, you could use the Design Automation API to run custom scripts (e.g., with Revit API or open-source IFC tools) that:
- Extract precise properties directly from the source model before export
- Post-process exported IFC files to adjust units with full precision
This gives you complete control over the data and conversion logic.
4. Inspect Full Response for Hidden Precision Data
For more complex properties, sometimes additional precision is stored in nested fields (like attributes or internal value entries). If the value field isn’t immediately visible (rare for basic dimensions), dig into the full JSON response to find unformatted numerical data matching the BIM 360 UI’s precise value.
内容的提问来源于stack exchange,提问作者EsbenCN

