Upgrading to Forge viewer v7.0

I mentioned a few weeks ago that I’d spent some of my time at the Forge Accelerator in Barcelona migrating the Dasher 360 codebase to work with v7.0 of the Forge viewer. This version of the viewer does have breaking changes – all of which should be documented in Jaime’s blog post – but I thought it worth listing the changes that affected us in a post of my own.

Forge viewer update

The first big change we had to deal with – and this one was pervasive, albeit easy to handle – was the promotion of GuiViewer3D from the Private namespace to be a fully supported member of Autodesk.Viewing. This meant a simple search & replace across the codebase to change Autodesk.Viewing.Private.GuiViewer3D to Autodesk.Viewing.GuiViewer3D. Easy.

The other big “breaking” change was that we needed to modify our onDocumentLoad() handler not to use Autodesk.Viewing.Document.getSubItemsWithProperties() anymore: instead we now use doc.getRoot().search(options), where options are the same we formerly passed…

Read more