繁体   English   中英

来自 Viewer3D 的属性的 dbId:getProperties 与来自 model 派生端点的 objectid 不匹配

[英]Properties' dbId from Viewer3D:getProperties not matching objectid from the model derivative endpoint

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

编辑:

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

例子:

查看器选项:

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

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

{
   "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
   }
]

SVF2 使用自己的 SVF2 和 SVF1 之间的 DbId 映射,并且GET properties端点使用 SVF1 DbId 作为 objectId,所以这就是 dbId 不匹配的原因。 我上周向我们的工程部门记录了一个愿望清单项目 (LMV-5782),以分配时间来评估在 SVF2 model 上获得 SVF1 DbId 的可能性。

如果您可以通过传递 SVF1 DbId 从GET properties端点获取IfcGUID ,那么就是我上面提到的情况。 对于给您带来的任何不便,我们深表歉意。

Autodesk 提供的 SVF1 和 SVF2 dbId 之间的 map 有一个新的临时解决方法: https://forge.autodesk.com/blog/temporary-workaround-mapping-between-svf1-and-svf2-ids

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM