Reputation: 45
We are trying to get the viewable from the files inside the "Plan" folder with the BIM360 API. But we managed to view only the rvt "object" inside this folder. The other "plans" extracted from this same rvt file, like 2D and 3D are not viewable.
Upvotes: 1
Views: 247
Reputation: 1288
So my understanding on how the 3D/2D models inside of the Plans folder get display in the BIM 360 Docs viewer are as follow.
The separate models do not have derivative available to be display, but if you notice one thing, the entire model is also available inside the folder. What do I mean by this? Each model has a list of Viewable files available within the model.
So, let's say you have the rac_basic_sample model uploaded to the Plans folder, the BIM 360 Docs UI will display you tiles for every 3D view and 2D Sheet available for that model. If you select any of those, the viewer will get initiated with the selected view, but this does not mean the view has an individual derivative, it means it is reading the one that matches a criteria with what is available from the complete model. If you take a closer look at the time you are loading a model into the viewer.
var viewables = Autodesk.Viewing.Document.getSubItemsWithProperties(doc.getRootItem(), {
'type': 'geometry',
'role': role}, true);
Your viewables variable will give you a list of all the GUID that are pertaining to a specific view, showing you the role (2d or 3d) like in this picture below.
What you can do is find the view that you want to display based by the name and tell the viewer to display that specific one which can get based on what you are selecting.
Upvotes: 1