November 26, 2018

Versioning your Viewer-based app

Default blog image

We talked about versioning your Viewer code before (see here) and showed how to do with a suffix, e.g.: ?v=v6.0

Starting on version 6 we can specify it on the URL, which allows us better control over the served file. The resulting HTML should look like: 

<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/6.0/style.min.css" type="text/css">
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/6.0/viewer3D.min.js"></script>

As we use Semantic Version we can replace minor and patch versions with * (star), resulting in something like:

<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/6.*/style.min.css" type="text/css">
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/6.*/viewer3D.min.js"></script>

The above will load any new minor or patch version from 6, which today (as of November 26) would be 6.3.1. You can also use 6.3.* to specify the minor or 6.3.1 to completely specify the version. 

Related Posts

May 10, 2019

Consume AEC Data which are from Model Derivative API

Model Derivative API has been able to extract AEC data of Revit model such as level, grid, views, phase, linked documents etc. And Forge Viewer also provides the corresponding methods ...

Read More

May 9, 2019

Basic point clouds in Forge Viewer

Developers often ask us whether point clouds are supported in Forge Viewer. Unfortunately, the official answer is "no".

Read More

May 6, 2019

Properties shown in case of multiple selection

When selecting multiple objects in the UI then the behaviour of the Property Palette (i.e. which object's properties the palette is showing) can seem a bit random.

Read More