加载到BIM360中的revit文件有问题;Forge查看器中的房间和空格不像链接https://forge.autodesk.com/blog/new-rvt-svf-model-derivative-parameter-generates-additional-content-including-rooms-and-spaces中报告的示例那样显示(参见

);没有体积,只有一点。否则,如果我将revit模型加载到一个桶中,按照上面的步骤,房间和空间将按照查看器伪造中的要求表示(请参见

)。是否有可能通过将数据管理的API参数设置为true,调用Data的API(作为模型派生的API,https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/)在BIM360文件夹中加载generateMasterViews文件?或者,在BIM360中是否有可能为上传的每个revit文件默认设置此选项?
蒂娅·奥尔德
发布于 2022-01-03 09:25:04
BIM360文档默认将generateMasterViews设置为true,因此不需要通过Forge派生API (而不是Data )对BIM360执行此操作。
BIM360的查看器称为Forge顶部的BIM360查看器,但BIM360查看器中并不包括Forge的所有功能。(见BIM 360查看器与Forge Viewer)
回到你的问题上,
你能试着加载你的模型,让你无法用这个查看代码看到房间吗?
var options = {
env: 'MD20Prod' + (atob(urn.replace('urn:', '').replace('_', '/')).indexOf('emea') > -1 ? 'EU' : 'US'),
api: 'D3S',
getAccessToken: getForgeToken
};
if (LMV_VIEWER_VERSION >= '7.48') {
options.env = 'AutodeskProduction2';
options.api = 'streamingV2' + (atob(urn.replace('urn:', '').replace('_', '/')).indexOf('emea') > -1 ? '_EU' : '');
}
Autodesk.Viewing.Initializer(options, () => {
viewer = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer'));
viewer.start();
var documentId = 'urn:' + urn;
Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
});
function onDocumentLoadSuccess(doc) {
const root = doc.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);
viewer.loadDocumentNode(doc, phaseViews[0], { skipHiddenFragments: false }).then(model => {
// any additional action here?
console.log({
'LMV version': LMV_VIEWER_VERSION
});
});
}
function onDocumentLoadFailure(viewerErrorCode) {
console.error('onDocumentLoadFailure() - errorCode:' + viewerErrorCode);
}参考文献:https://github.com/yiskang/forge-viewhubmodels-nodejs-svf2/blob/main/public/js/ForgeViewer.js
https://stackoverflow.com/questions/70529167
复制相似问题