By Adam Nagy
Each time a new version of the viewer comes out it provides some new functionality that you can take advantage of. Unfortunately, sometimes in order to implement those, certain things need to be reorganised and those changes might break your code.
The way to avoid your web app being broken when a new viewer version comes out, is specifying the version number that your application is compatible with. This option has been introduced in version 0.1.86
So when you link to the CSS and JS files of the viewer, simply add a "v" parameter to the URL and specify the version number. E.g. in case we want to use version 0.1.86 we would use this in our html file:
<link type="text/css" rel="stylesheet" href="https://developer.api.autodesk.com/viewingservice/v1/viewers/style.css?v=0.1.86"/>
<script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js?v=0.1.86"></script>
This way it's up to you when you move to the latest version of the viewer.
Note: If you did not provide a version then you'll also get this message in the browser's Console window:
No viewer version specified, will implicitly use <latest version>
You can find some info about the improvements that were added in each version here: http://forums.autodesk.com/t5/view-and-data-api/release-history/td-p/5570580
The release history seems to be last updated in May. Is there a more current list? I question because today I am getting v1.2.16 with some requests, and sometimes v2.5
Posted by: Jeffery Geer | 03/17/2016 at 03:35 PM
You can use the following url to get viewer api and styles, the version number is now directly part of the url, so no need to specify it with ?v=vxxx
https://autodeskviewer.com/viewers/2.5/viewer3D.min.js
https://autodeskviewer.com/viewers/2.5/style.css
Posted by: Philippe Leefsma | 03/18/2016 at 10:58 AM