如何在Autodesk Data Exchange GraphQL查询中切换为英制单位?
Autodesk Data Exchange GraphQL API 切换英制单位方法
可以通过在查询的properties字段中添加unitSystem参数,指定为IMPERIAL来让API返回英制单位的数值。
修改后的查询示例如下:
query getQuantityTakeoff ($exchangeId:ID!) { exchange(exchangeId: $exchangeId) { id name version { versionNumber } elements { results { id name properties(unitSystem: IMPERIAL) { results { name value propertyDefinition { description specification units } } } } } } }
修改后,返回结果中的单位会自动切换为英制,比如体积属性的units会变为"Cubic feet",value也会对应转换为英制下的数值。
内容的提问来源于stack exchange,提问作者Jonathan
相关产品推荐
相关产品推荐

