Reputation: 11
We are trying to export dimensional properties for elements using Forge Viewer with getBulkProperties
method. For Revit files, the method works fine, but for Navisworks files, we cannot get any useful properties directly.
As we investigate into the problem, we found that the all the externalId
for Navisworks file are in the format of slash separated integers (e.g. 1/2/2/1/1
). If we chop off the last integer from externalId
(in this case, using 1/2/2/1
), and get the properties of the corresponding element, then we can have some useful dimensional properties, and the value matches the information we see on desktop version of Navisworks.
Does the externalId
for Navisworks encoding implies a tree structure? (I am assuming 1/2/2/1
is the parent of 1/2/2/1/1
in this case). What could explain our issue that by just chopping off the last integer, we can get the information we need? Is this a reliable way to get dimensional properties?
A small experiment to reproduce this in Chrome console:
selected = AutodeskViewer.getSelection()[0]
AutodeskViewer.getProperties(selected, console.log)
/* {dbId: Array(1), properties: Array(0), externalId: "12/6/0/0/0/0"} */
/* We don't have any useful properties here */
// Get External ID mapping
map = {}; AutodeskViewer.model.getExternalIdMapping(ext_map => {map = ext_map})
// Chopoff the last integer, and run getProperties again
AutodeskViewer.getProperties(map['12/6/0/0/0'], console.log)
/* {dbId: 78085, properties: Array(151), externalId: "12/6/0/0/0", name: "Floor"} */
/* We get useful dimensional properties */
Upvotes: 1
Views: 919