'Failed to open DWF / DWFX file natively in Forge Viewer
I am using the below code to open the DWF file. File size is more than 20MB.
const options = {
env: 'Local',
useADP: false}
var config3d = {
extensions: ['Autodesk.Viewing.MarkupsCore'],
loaderExtensions: { dwf: "Autodesk.MemoryLimited" },
};
viewer2D = new Autodesk.Viewing.Private.GuiViewer3D(document.getElementById('MyViewerDiv'), config3d);
Autodesk.Viewing.Initializer(options,async function () {
debugger;
viewer2D.start();
viewer2D.setTheme('light-theme');
viewer2D.loadExtension('Autodesk.DWF').then(() => {
viewer2D.loadModel("http://xxxxxx/xxxxx//xxx//xxxx.dwf");
});
});
I am stuck in the Translation. Screenshot below: ConsoleError
Any help would be appreciated.
Solution 1:[1]
You can try this simple Forge application that loads a dwf file on the viewer: https://github.com/petrbroz/forge-simple-viewer-nodejs/tree/sample/native-dwf
You can also check out the blog post on Forge support for DWF files: https://forge.autodesk.com/blog/dwf-and-pdf-support-forge-viewer
These samples will guide you on how to implement your application.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | TimmyTim |