There are a couple of reasons that might cause this behavior.
- For Revit, only the master views have room geometries, so you need to load master views in Forge Viewer to see rooms.
// Method 1
bubbleNode.getDefaultGeometry(true); //!<<< get first master view
// ref: https://github.com/Autodesk-Forge/forge-dataviz-iot-react-components/blob/main/client/components/Viewer.jsx#L156
// Method 2
const root = viewerDocument.getRoot();
const viewables = root.search({'type':'geometry', 'role': '3d'});
console.log('Viewables:', viewables);
const phaseViews = viewables.filter(v => v.data.name === v.data.phaseNames && v.getViewableRootPath().includes('08f99ae5-b8be-4f8d-881b-128675723c10'));
console.log('Master Views:', phaseViews);
- Before viewer
v7.52
, Rooms are hidden by default when loading the SVF2 view with Forge Viewer. To make Rooms visible, you need to set skipHiddenFragments: false
to viewer.loadDocumentNode
await this.viewer.loadDocumentNode(
doc,
masterViewBubble,
{
skipHiddenFragments: false
}
);
Update Sept. 17: With v7.52
and the later versions, we just need to be sure to load the master view bubble to see rooms of Revit.
await this.viewer.loadDocumentNode(
doc,
masterViewBubble
);
ref: https://github.com/Autodesk-Forge/forge-bim360-assets.viewer#troubleshooting
- The
Revit Area and Volume Computations
is not Areas and Volumes
: https://stackoverflow.com/a/67775385/7745569