Viewer3D 中的属性 dbId:getProperties 与模型衍生端点中的 objectid 不匹配 [英] Properties' dbId from Viewer3D:getProperties not matching objectid from the model derivative endpoint

查看:13
本文介绍了Viewer3D 中的属性 dbId:getProperties 与模型衍生端点中的 objectid 不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Viewer3d::getProperties 不再使用当前的 SVF2 测试环境时,不会返回所有可用的属性.例如,属性 Element ID->Value 在查看器中不可用,但在 https://developer.api.autodesk.com/modelderivative/v2/返回的数据中可用region/eu/designdata/:urn/metadata/:guid/properties.我的问题是我们通过 IfcGuid 通过 IfcBuildingStorey 节点在 下访问了一个层节点,它不再工作(也许是因为新的层管理器?).图层管理器​​是否支持 IfcGuid 或如何在查看器中获取属性?

Viewer3d::getProperties does not return all available properties when using the current test environment for SVF2 anymore. For example the property Element ID->Value is not available in the viewer but is available in the data returned by https://developer.api.autodesk.com/modelderivative/v2/regions/eu/designdata/:urn /metadata/:guid/properties. My problem is that we accessed a storey node by IfcGuid via the IfcBuildingStorey node under <No Level> which does not work anymore (Maybe because of the new layer manager?). Does the layer manager support IfcGuid or how do I get the properties in the viewer?

我发现属性端点中的某些 objectid 与查看器中的 dbId 不匹配.据我所知,它们应该是相同的,请参阅此 SO 答案.有人知道为什么吗? SVF2 的 dbId 与 SFV1 的 dbId 不匹配.建议改用 externalId.请参阅此处

I found out that some objectids from the properties endpoint do not match the dbIds in the viewer. To my knowledge they should be the same, see this SO answer. Does someone know why? SVF2's dbId do not match SFV1's dbId. It was advised to use externalId instead. See here

查看器选项:

Autodesk.Viewing.Initializer({
            'env': 'MD20ProdEU', //svf2
            'api': 'D3S', //svf2
},...

调用属性端点的原始属性:

Original properties from calling the properties endpoint:

{
   "objectid":81443,
   "name":"11. OG",
   "externalId":"0/0/0/15",
   "properties":{
      "Element ID":{
         "Value":"47823"
      },
      "Item":{
         "Hidden":"No",
         "Icon":"Layer",
         "Layer":"11. OG",
         "Material":"",
         "Name":"11. OG",
         "Required":"No",
         "Source File":"190719_Cule_Revit_Structure.ifc",
         "Type":"Levels: Level: Level 1"
      }
   }
}

Viewer3d::getProperties

[
   {
      "displayName":"child",
      "displayValue":81444,
      "displayCategory":"__child__",
      "attributeName":"child",
      "type":11,
      "units":null,
      "hidden":1,
      "precision":0
   },
   {
      "displayName":"parent",
      "displayValue":4,
      "displayCategory":"__parent__",
      "attributeName":"parent",
      "type":11,
      "units":null,
      "hidden":1,
      "precision":0
   },
   {
      "displayName":"viewable_in",
      "displayValue":"190719_Cule_Revit_Structure.ifc",
      "displayCategory":"__viewable_in__",
      "attributeName":"viewable_in",
      "type":20,
      "units":null,
      "hidden":1,
      "precision":0
   },
   {
      "displayName":"node_flags",
      "displayValue":2,
      "displayCategory":"__node_flags__",
      "attributeName":"node_flags",
      "type":2,
      "units":null,
      "hidden":1,
      "precision":0
   },
   {
      "displayName":"Name",
      "displayValue":"11. OG",
      "displayCategory":"Item",
      "attributeName":"Name",
      "type":20,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Type",
      "displayValue":"Levels: Level: Level 1",
      "displayCategory":"Item",
      "attributeName":"Type",
      "type":20,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Icon",
      "displayValue":"Layer",
      "displayCategory":"Item",
      "attributeName":"Icon",
      "type":21,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Hidden",
      "displayValue":0,
      "displayCategory":"Item",
      "attributeName":"Hidden",
      "type":1,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Required",
      "displayValue":0,
      "displayCategory":"Item",
      "attributeName":"Required",
      "type":1,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Material",
      "displayValue":"",
      "displayCategory":"Item",
      "attributeName":"Material",
      "type":20,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Source File",
      "displayValue":"dummy.ifc",
      "displayCategory":"Item",
      "attributeName":"Source File",
      "type":20,
      "units":null,
      "hidden":false,
      "precision":0
   },
   {
      "displayName":"Layer",
      "displayValue":"11. OG",
      "displayCategory":"Item",
      "attributeName":"Layer",
      "type":20,
      "units":null,
      "hidden":false,
      "precision":0
   }
]

推荐答案

Autodesk 提供了一种新的临时解决方法来映射 SVF1 和 SVF2 dbId:https://forge.autodesk.com/博客/临时解决方法-mapping-between-svf1-and-svf2-ids

There is a new temporary workaround to map between SVF1 and SVF2 dbIds provided by Autodesk: https://forge.autodesk.com/blog/temporary-workaround-mapping-between-svf1-and-svf2-ids

这篇关于Viewer3D 中的属性 dbId:getProperties 与模型衍生端点中的 objectid 不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆