我正在尝试获取与转换后的 rvt 文件一起使用的所有 2d 和 3d 模型的列表。
查看较旧的示例: LmvNavTest他们会执行类似的操作来访问“文档” rootItem
Autodesk.Viewing.Document.load(fullUrnStr, function(document) {
_loadedDocument = document; // keep this in a global var so we can reference it in other spots
// get all the 3D and 2D views (but keep in separate arrays so we can differentiate in the UX)
_views3D = Autodesk.Viewing.Document.getSubItemsWithProperties(document.getRootItem(), {'type':'geometry', 'role':'3d'}, true);
_views2D = Autodesk.Viewing.Document.getSubItemsWithProperties(document.getRootItem(), {'type':'geometry', 'role':'2d'}, true);
据我了解,现在首选的方法是使用 loadModel
oViewer =new Autodesk.Viewing.Private.GuiViewer3D ($("#viewerContainer") [0], {}) ;
oViewer.loadModel (url , [], onLoadSuccess, onLoadFail) ;
如果我以 loadModel 方式执行此操作,我如何访问文档以便调用它的 getSubItemsWithProperties 方法