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 objectid
s from the properties endpoint do not match the dbId
s 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
}
]