即使2D视图包含所选文件室的属性信息,属性窗口也不会填充任何属性

下面是加载模型的函数。我遗漏了什么?
function loadModel() {
var initialViewable = viewables[indexViewable];
var svfUrl = lmvDoc.getViewablePath(initialViewable);
var modelOptions = {
sharedPropertyDbPath: lmvDoc.getFullPath(lmvDoc.getRoot().findPropertyDbPath())
};
viewer.loadModel(svfUrl, modelOptions, onLoadModelSuccess, onLoadModelError);
}发布于 2020-07-22 15:33:54
代码中缺少一行,请尝试执行以下操作:
var sharedDbPath = initialViewable.findPropertyDbPath();
sharedDbPath = lmvDoc.getFullPath( sharedDbPath );
var modelOptions = {
sharedPropertyDbPath: sharedDbPath
};但是,您现在应该不需要手动指定sharedPropertyDbPath。您可以利用Viewer3D#loadDocumentNode直接加载模型。它将自动为您确定路径。(从v7查看器启动)
const initialViewable = viewables[0];
viewer.loadDocumentNode( lmvDoc, initialViewable, loadOptions )
.then( onLoadModelSuccess )
.catch( onLoadModelError );https://stackoverflow.com/questions/63024365
复制相似问题