0

SVF モデルを読み込もうとすると、サーバー エラー 404 が発生し、モデルをアップロードして翻訳したにもかかわらずリソースの読み込みに失敗し、スケッチ形式の SVF ファイルが見つかりません。また、他の形式でも機能します。

モデルの壷: 'dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6d3Rfd2hpdGluZ3R1cm5lci83LTEyLTE1JTIwSlNNLnNrcA=='

モデルの読み込みに使用している URL https://developer.api.autodesk.com/viewingservice/v1/items/urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6d3Rfd2hpdGluZ3R1cm5lci83LTEyLTE1JTIwSlNNLnNrcA==/output/1/7-12- 15%20JSM.svf

Sketch ファイル形式に問題はありますか

ビューア Javascript コード: options.env = _viewerEnv; // AutodeskProduction、AutodeskStaging、または AutodeskDevelopment (このプロジェクトのグローバル変数で設定) options.getAccessToken = getAccessToken; options.refreshToken = getAccessToken;

Autodesk.Viewing.Initializer(options, function() {
    loadDocument(data);   // load first entry by default
});

function loadDocument(urnStr) {

_loadedDocument = null; // reset to null if reloading
_loadedSecondaryDocument = null;

if (!urnStr || (0 === urnStr.length)) {
    alert("You must specify a URN!");
    return;
}
var fullUrnStr = "urn:" + urnStr;

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);

    loadViewMenuOptions();                   // populate UX with views we just retrieved
    initializeViewerMain(mainViewerSelectionChanged);
    initializeViewerSecondary(secondaryViewerSelectionChanged, secondaryViewerGeometryLoaded);

        // load up first 3D view by default into the primary viewer
    if (_views3D.length > 0) {
        loadView(_loadedDocument, _viewerMain, _views3D[0]);
    }
    else {      // there weren't any 3D views!
        if (_views2D.length > 0) {
            loadView(_loadedDocument, _viewerMain, _views2D[0]);
            $('#pu_viewToLoad').val('1000'); // selects first option in 2D list
        }
        else {
            alert("ERROR: No 3D or 2D views found in this drawing!");
        }
    }
        // now load the Secondary viewer with the first 2D view by default
    if (_views2D.length > 0) {
        loadView(_loadedDocument, _viewerSecondary, _views2D[0]);
        $('#pu_viewToLoad').val('1000'); // selects first option in 2D list
    }
    else {
        console.log("WARNING: No 2D views found for secondary view, using additional 3D view");
        if (_views3D.length > 0)
            loadView(_loadedDocument, _viewerSecondary, _views3D[0]);
    }


}, function(errorCode, errorMsg) {
    alert('Load Error: ' + errorCode + " " + errorMsg);
});
}

どんな助けでも大歓迎です。

4

0 に答える 0