I am trying to display 2d file in viewer in Offline mode using pure Javascript. I have already uploaded and extracted dwg using https://extract.autodesk.io/ . Extracted file contains many json.gz files and one folder. In this folder, it has manifest, metadata (json.gz file) and one .f2d file
I have given this file location to my viewer options
var docs = [{ "path": "./{foldername}/primaryGraphics.f2d", "name": "2D view" }];
var options = { 'docid': docs[0].path, env: 'Local' };
And my viewer initialization is
viewer = new Autodesk.Viewing.Private.GuiViewer3D(document.getElementById('MyViewerDiv'), {});
Autodesk.Viewing.Initializer(options, function () {
viewer.initialize();
viewer.loadModel(options.docid);
});
It is giving me error message in the viewer saying "We cant display the item you are looking for. It may not have been processed yet...." And giving me error code as 5 (Specified type is invalid).
Please help.