请确保已完全下载所有提取的DWG可见气泡,并且要加载的模型路径正确,因为错误代码5代表
NETWORK_FILE_NOT_FOUND
.
var options = {
env: 'Local',
};
var doc = { 'rootFolder': 'Model', 'path': '29c9e407-f76f-a1c0-0972-dcb5b496fff9_f2d/primaryGraphics.f2d', 'name': '2D view' };
var viewerDiv = document.getElementById( 'MyViewerDiv' );
var viewer = new Autodesk.Viewing.Private.GuiViewer3D( viewerDiv );
Autodesk.Viewing.Initializer(options, function() {
if( viewer.initialize() != 0 ) return console.error( 'Failed to initialize viewer' );
var basePath = getCurrentBaseURL();
var modelFolderPath = basePath + doc.rootFolder + '/';
var modelFilePath = modelFolderPath + doc.path;
var modelOptions = {
sharedPropertyDbPath: mod