0

I have 2 models loaded into Viewer , when i try to loop through these models and use this method select(dbids, model, selectionType) to select multi elements from both model but it only highlight (blue color) elemens on the last model. Is it possible to highlight all of these elements at the same time ? Because i also need to add or remove what i have selected by holding ctrl key so i need to make all of them highligh. I follow this tutorial to get elemens https://forge.autodesk.com/blog/custom-window-selection-forge-viewer-simpler-extension Thank in advance

Trung Tran
  • 63
  • 7

1 Answers1

0

I think the other post has replied the question. Shortly speaking: After Forge Viewer 4.0, try the code below:

var selections = [
 {
   model: targetModel,
   ids: dbIds
  }
];
viewer.impl.selector.setAggregateSelection( selections );

Please check if it helps. Forge Viewer Select in a multi-model context

Xiaodong Liang
  • 2,051
  • 2
  • 9
  • 14