0

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?

Edit:

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

Examples:

Viewer options:

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

Properties returned by 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
   }
]
Dominik
  • 241
  • 2
  • 12

2 Answers2

0

SVF2 uses its own DbId mapping between SVF2 and SVF1, and the GET properties endpoint is using SVF1 DbId as objectId, so it's why the dbId mismatched. I logged a wishlist item (LMV-5782) last week to our engineering to allocate time to evaluate the possibility of getting SVF1 DbId on the SVF2 model.

If you can get IfcGUID from GET properties endpoint by passing SVF1 DbId, then it's the case I mentioned above. We apologize for any inconvenience had caused.

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
  • I think it is only necessary because to load only specific nodes we have supply `dbId`s to the loadModel function. See my other [SO-Question](https://stackoverflow.com/questions/65337708/how-can-i-load-only-specifc-objects-in-the-forge-viewer-using-sfv2). My problem is that the `Element ID -> Value` property is missing from the nodes under `->IfcBuildingStorey` which could be used to find the corresponding node containg the storey's elements. So my question is: how can I find the corresponding node of an `IfcBuildingStorey` node if the `Element ID->Value` property does not exist? – Dominik Dec 17 '20 at 11:00
  • If I understand it correctly, you want to load elements of a specific level by element id? And what is the layer manager? is it the model structure panel or something else? – Eason Kang Dec 17 '20 at 11:10
  • Kinda, I want to load only a specific level and not the whole model because of its size. The layer manager is a new tool provided by the forge viewer itself. For our ifc model it lets you show and hide storeys. – Dominik Dec 17 '20 at 11:29
  • Ok, sorry ... I'm not aware of the layer manager extension that can be used in that way. Now we have an internal discussion with our engineering team regarding the `objected` of the GET properties endpoint for SVF2. So, I'm curious what your use case is in detail. Could you share non-confidential information with us via forge[DOT]help[AT]autodesk[DOT]com? I can pass it to our engineering team for evaluation. – Eason Kang Jan 06 '21 at 10:56
  • I wrote a an email describing our use case briefly. – Dominik Jan 11 '21 at 09:41
  • Btw. here's a temporary workaround until the SVF1/SVF2 dbid mapping is provided by the Model Derivative service: https://forge.autodesk.com/blog/temporary-workaround-mapping-between-svf1-and-svf2-ids. – Petr Broz Jun 03 '21 at 06:35
0

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

Dominik
  • 241
  • 2
  • 12