When I try to load the SVF model, it gives me server error 404, failed to load the resource though the model is uploaded and translated, it is unable to find the SVF file of the sketch format. And it does work for other formats.
Urn of the model: 'dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6d3Rfd2hpdGluZ3R1cm5lci83LTEyLTE1JTIwSlNNLnNrcA=='
URL I'm using to load the model, https://developer.api.autodesk.com/viewingservice/v1/items/urn:adsk.viewing:fs.file:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6d3Rfd2hpdGluZ3R1cm5lci83LTEyLTE1JTIwSlNNLnNrcA==/output/1/7-12-15%20JSM.svf
Is there any issues with Sketch file format
Viewer Javascript Code: options.env = _viewerEnv; // AutodeskProduction, AutodeskStaging, or AutodeskDevelopment (set in global var in this project) 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);
});
}
Any help is greatly appreciated appreciated.