rbyrnedugan

Multiple Ad-Hoc Selections for PI Vision ProcessBook Displays (Chrome Extension)

Blog Post created by rbyrnedugan on Sep 26, 2018

About

This project is a Google Chrome extension that adds functionality for creating ad-hoc trends from multiple data items when viewing imported PI ProcessBook displays in PI Vision.  When viewing an imported PI ProcessBook display, it is now possible to multi-select data items (using Ctrl+Click or Shift+Click) and then create an ad-hoc trend from those data items using the button in the top bar.

screenDemo.gif

This extension is targeted at PI Vision 2017 R2 (3.3.x) and earlier. PI Vision 2019 will have similar functionality built in.

This extension is still in beta.  Please try it out and let me know if you run into any issues.

 

Removing the Screen Flash

When using the Ctrl+Click or Shift+Click on a display, PI Vision™ will still try to launch the standard overlay trend display, and the extension will immediately close it.  This will cause a quick flash on the screen as the trend is loaded and then closed.  This can be resolved by modifying the code for the click event listener in PI Vision.

 

Note: This is an unofficial workaround,  and will need to be repeated after upgrading PI Vision.  Line numbers listed are for PI Vision 2017 R2, but may be different in other versions.

 

The following modification to the file will not show the trend popup if Ctrl or Shift are pressed:

File: %pihome64%\PIVision\Scripts\app\pbviewer\pbviewer.display.viewmodel.js

Original (lines 638 - 642)

$('#' + symbolNameSelector)
    .click(function () {
        that.selectedSymbol = symbolName;
        that.toggleMode();
    });

Modified

$('#' + symbolNameSelector)

    .click(function (e) {

        if (!(e.shiftKey || e.ctrlKey)) {

            that.selectedSymbol = symbolName;

            that.toggleMode();

        }

    });

Links and How to get it

Download it from the Chrome Web Store: Ad-Hoc Selector for PI Vision™ - Chrome Web Store

View the source code on GitHub: https://github.com/rbyrnedugan/PI-Vision-Ad-Hoc-Extension

 

This extension is targeted at PI Vision 2017 R2 (3.3), but should work with earlier versions too. PI Vision 2019 will have similar functionality built in.

This extension is still in beta, and is regionally restricted to the US for now (waiting for an OK from legal).  Please try it out and let me know if you run into any issues.

Outcomes