Alternative Model Tree

I have updated the Model Tree code to now support multiple independent model trees for different parts of the hierarchy. This can be useful for separating the model tree in the case of federated BIM models for example. To make this work the constructor was slightly changed. It now accepts the div id’s for the modeltree, relationshiptree and properties. Those will be used only if useLayout is set to false. The startnode for the model tree is then set in the refresh() function that should be called after the scTree object has been created.

See below for an example that creates two modeltrees, the second one omitting the relationshiptree and the properties.

var scTree1 = new ScTree(hwv, false, true, "modeltreediv", "relationshipdiv", "propertydiv");
var scTree2 = new ScTree(hwv, false, false, "modeltreediv2", null,null);

scTree1.refresh(node1);
scTree1.refresh(node2);

ScTree.js (25.9 KB)