# Choose HTML resource according to software version

**URL:** <https://forum.universal-robots.com/t/choose-html-resource-according-to-software-version/2529>\
**Category:** URCaps SDK\
**Created:** [August 15, 2018, 1:43pm UTC](https://forum.universal-robots.com/t/choose-html-resource-according-to-software-version/2529 "2018-08-15T13:43:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon16416181](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@anon16416181](https://forum.universal-robots.com/u/anon16416181)\
**Post date:** [August 15, 2018, 1:43pm UTC](https://forum.universal-robots.com/t/choose-html-resource-according-to-software-version/2529/1 "2018-08-15T13:43:01Z")

</div>

Hi all!

With the release of PS 5.0, I noticed some differences about how the UI elements are displayed. The resolution is a bit higher, and HTML elements look a bit different.

I was thinking that for our URCap that was built for PS 3.x, one option to adjust these visual details would be to use a different HTML file for the installation / command screens according to the software version. The problem is that in `InstallationNodeService`, the method `getHTML` is called before `createInstallationNode`, so I don’t have access to the API object at the time when the HTML file is requested, and therefore I can’t get the software version.

Is there any workaround this? Perhaps a way to get the software version in the activator instead? I think that it would be a bit hard to make a single HTML resource look good for both PS 3.x and 5.x.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![anon42905246](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@anon42905246](https://forum.universal-robots.com/u/anon42905246)\
**Post date:** [August 16, 2018, 6:18am UTC](https://forum.universal-robots.com/t/choose-html-resource-according-to-software-version/2529/2 "2018-08-16T06:18:14Z")

</div>

There is getSoftwareVersion() method in URCapAPI, that you can use. Should be straightforward.

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [August 16, 2018, 6:34am UTC](https://forum.universal-robots.com/t/choose-html-resource-according-to-software-version/2529/3 "2018-08-16T06:34:55Z")

</div>

If you bump your API version used to 1.3, you can use `URCapAPIFacade.getSystemAPI().getSoftwareVersion()` in the `getHTML()` call.  
Since API 1.3 (PolyScope 3.6/5.0) we are able to provide the SystemAPI at the time, where `getHTML()` is called. This my not be the case on previous versions, where you would use the now deprecated `URCapAPIFacade.getURCapsAPI()`

 ![getVersionHTML](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/1X/a2ec1c3684ff91cd6dcaf92f41559ef2179e9223.png)
