In the Viewer, I am dynamically aggregating models from multiple BIM files. The process involves initializing the viewer and then using LoadDocument and LoadModel for each model chosen by the user. These models are primarily NVC files (the ones I used for testing) that share a coordinate system. For the most part, the models load dynamically and stitch together correctly.
However, there seems to be an issue with the coordinate system when loading the second model - not always, but in some cases (specifically in v6.3 - I have not tested previous versions). When this problem occurs, I observe the following:
- Clicking the 'home' icon in the viewer only shows the first loaded model centered on the screen while the rest appear off-screen.
- Selecting an element results in selecting something else (with an offset), or in some cases, nothing at all (indicating the clicked coordinates were interpreted incorrectly).
After several attempts, it appears that this issue arises when the first loaded model does not occupy the full size of the aggregated model (such as one floor of a building).
I have found a workaround where, after loading the models, if I 'hide' and 'show' them again, it resolves the clicking and AGGREGATED_SELECTION event issues.
This solution is not ideal as I would prefer to load the models in the background while the user navigates around the existing aggregated model-set. Having to hide/show after loading a new model would disrupt the user experience.
Is there a way to 'reset' the viewer's coordinate system similar to what happens when hiding/showing the models?
Any assistance in resolving this issue would be greatly appreciated.
Thank you, Bandu