About ViewApp namespaces
- Last UpdatedDec 06, 2024
- 3 minute read
ViewApp Namespaces are repositories for custom ViewApp attributes. A ViewApp Namespace can be thought of as a tag bucket, and the ViewApp Namespace attributes as individual tags. ViewApp Namespace attributes are functionally similar to graphic custom properties, but are not bound to individual graphics. To invoke autocomplete for ViewApp namespaces and attributes when creating a graphic or layout script in the Script Editor, enter the keyword "MyViewApp." For more information, see About custom properties for graphics.
ViewApp Namespaces are owned by the Galaxy in which they are created. You can can reuse ViewApp Namespaces across multiple Viewapps, but while configuration data is shared across all ViewApps, runtime values can only be shared within a single ViewApp. Each ViewApp maintains its own copy of the ViewApp Namespace data. ViewApp Namespace attributes can be used in graphic scripts and references, animation scripts, and layout scripts and references. When you create references to ViewApp attributes in graphic or layout scripts and animations, attribute values can be shared across different panes of a running AVEVA OMI ViewApp. The ViewApp Namespace attributes are referenced much like static ViewApp attributes for alarms, navigation, language, etc. For more information, see "My ViewApp Attributes" in the AVEVA OMI SDK Help for more information about the static ViewApp attributes.
Note: ViewApp Namespace attributes cannot be referenced from an object script. References from object scripts will validate successfully within the script editor, but a configuration error message will be displayed when you save the object. Objects that contain a script that references a ViewApp Namespace attribute will remain in a warning state and the reference will not resolve.

ViewApp Namespace Editor
The ViewApp Namespace Editor lets you perform the following functions:
-
Add, duplicate, and remove ViewApp attributes
-
Rename ViewApp attributes
-
Set ViewApp attribute data types
-
Configure initial ViewApp attribute values
-
Set ViewApp attributes as read-only and/or retentive
-
Add descriptions to ViewApp attributes
ViewApp Namespace Elements
Each ViewApp Namespace attribute consists of the following elements:
-
Name: this is a string and must match galaxy naming rules
-
Description: the description is shown when browsing for attributes in the Galaxy Browser
-
Data type: supported data types and default values are:
-
Boolean – false (unchecked)
-
Double – 0.0
-
Elapsed time – 00:00:00.0000000
-
Float – 0.0
-
Integer – 0
-
String – empty string ("")
-
Time – current time, in the format 2/18/2018 11:36:14:385 AM
Note: Wherever possible, the initial value of the attribute persists when the attribute type is changed. The most notable exception to this behavior occurs when changing an attribute type from Boolean to String. In this case, the initial value is set to an empty string.
-
-
Read-only option: when selected, the value will not change at runtime. Default value is unchecked (false).
-
Initial value or expression: expressions can be used as values
-
Retentive value: default value is unchecked (false). The last runtime value of a retentive attribute is saved during a clean shut-down of the ViewApp, and will be restored the next time the ViewApp is launched. An attribute cannot be both read-only and retentive.