I'm currently doing an internship in a company specialized in BIM. My mission so far consists in implementing a Forge Autodesk viewer, suited for the aggregation and the display of multiple models. I've managed to code a working viewer, and to find a supposed way to aggregate models, but I can't understand how to make them work together.
I've already implemented a viewer, following the Forge Autodesk tutorial, and found on the Forge Autodesk blog an article about viewing multiple models with a code I'm trying to integrate to my viewer, at this point unsuccessfully.
The viewer I implemented : http://learnforge.autodesk.io/#/
The supposed way to display aggregated models : https://forge.autodesk.com/blog/supporting-multiple-models-new-modelstructurepanel
I should be able to select and display several loaded models in the same viewer (for example a model for a building and a model for the pipe network). However, I can't figure out how this script has to be added to my viewer. I've already tried to contact the author, but he answered me he was not working with Autodesk anymore, and told me to ask the Forge support about my issue.
Thanks in advance !
Basically in simpler terms to aggregate models one will need to load them respectively:
See a simple live sample here
As was mentioned in Philipe's article you will need to subscribe to different events as opposed to single model like
AGGREGATE_SELECTION_CHANGED_EVENT
,Autodesk.Viewing.AGGREGATE_ISOLATION_CHANGED_EVENT
,Autodesk.Viewing.AGGREGATE_FIT_TO_VIEW_EVENT
etc when working with multiple models.And starting from Viewer v6 the built-in
model browser
deals a lot better with multiple models and almost covers the functionality described in the article - you can look into the code sample there and come up with your own extension: