简体   繁体   中英

Mouse click vs viewer.select function selection behave differently in Autodesk Forge multi models viewer

I have been working on multi-model from the last couple of weeks and found that selection of a model object using mouse click vs viewer select function behave differently.

I have two models one architectural and another mechanical. When I select a wall or room on the architectural model using mouse click, Object select with overlay without having any problem but when I try using viewer select function with same object, it hides behind the wall and overlay doesn't work. It is only happening with the architectural model and working fine with the mechanical model.

Please suggest me if I am doing something wrong with multi-model.

To programmatically select components when working with multiple models use viewer.select(dbid, model) :

let model = viewer.impl.modelQueue().getModels()[index] or viewer.impl.findModel(modelId);
viewer.select(dbid, model)

And to get selected dbids use viewer.getAggregateSelection (see doc here ) the event to subscribe to AGGREGATE_SELECTION_CHANGED_EVENT (doc here ) to track selection changes:

If the issue persists can you send some screenshots and your models (links via a sharing service like weTransfer/Dropbox) for further investigation over to forge.help@autodesk.com?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM