PI Vision OMI App scripting
- Last UpdatedJul 18, 2024
- 2 minute read
The PI Vision app lets you script many of the PI Vision properties. Scripts that incorporate methods and their parameters as well as PI Vision app properties are supported. Script statements can be specified using the MyContent Namespace format in layout scripting by the following syntax formats:
MyContent.name of the PI Vision App instance.PIVisionApp_Method(parameter_1, parameter_2, parameter_n);
or
MyContent.name of the PIVision App instance.PIVisionApp_Property = xxx
Scripting methods
The PI Vision OMI App includes the Refresh() scripting method for layout scripts.
PI Vision OMI App properties in layout scripts
The following table lists PI Vision OMI App properties as they appear in the Properties page of Layout and ViewApp editors and how they are specified in layout scripting. Notice that property names in layout scripting are single words without blank spaces.
-
Property Names: In most cases, with the exception of Max Context DataItems to Show, the scriptable property name is identical to the property name as shown in the Properties page.
-
Layout Scripts: All properties, with the exception of Symbol Type, are scriptable in layout scripts.
-
Bindable Properties: All properties, with the exception of Symbol Type, can be configured in the property grid to be bindable at run time.
PI Vision App Properties
Layout Script Editor
Scriptable
Bindable
Web Server
WebServer
yes
yes
Web Site
WebSite
yes
yes
View Dashboard Display
ViewDashboardDisplay
yes
yes
Dashboard ID
DashboardID
yes
yes
Asset Path
AssetPath
yes
yes
View Ad hoc Display
ViewAdhocDisplay
yes
yes
Context Asset Server
ContextAssetServer
yes
yes
Context Asset Database
ContextAssetDatabase
yes
yes
Data Items
DataItems
yes
yes
Symbol Type
SymbolType
NO
NO
Start Time
StartTime
yes
yes
End Time
EndTime
yes
yes
Follow Current Context
FollowCurrentContext
yes
yes
Max Context DataItems to Show
MaxContextDataItemsCount
yes
yes
View Display URL
ViewDisplayURL
yes
yes
Display URL Parameters
DisplayURLParameters
yes
yes
Hide Toolbar
HideToolbar
yes
yes
Hide Sidebar
HideSibebar
yes
yes
Kiosk Mode
KioskMode
yes
yes
Style Sheet
StyleSheet
yes
yes
Event scripting
The following event is exposed for scripting:
PIVisionLoaded: This notifies the app that display has finished loading.