ShowContent()
- Last UpdatedAug 18, 2025
- 6 minute read
Loads a content item into an AVEVA OMI pane. This function is available within an Industrial Graphics client script or layout script to show the content of pane.
To load a graphic into a modal or modeless popup window, use ShowGraphic(). You can use ShowGraphic() for both AVEVA OMI and InTouch HMI ViewApps. The ShowContent() method is for AVEVA OMI only.
Notes:
1) While the ShowContent() function is available in object scripts through both IntelliSense
and the IDE function browser, its use in object scripts is not supported.
2) ShowContent() is not supported in graphics used in OMI MapApp.
Category
Graphic Client
Syntax
To show content, in this case a 2-way valve symbol, within a specified screen and pane:
Dim contentInfo as aaContent.ContentInfo;
contentInfo.Content = “SA_Valve_2Way”;
contentInfo.Name =”SA_Valve_2Way1”;
contentInfo.ContentType = “Level_3”;
contentInfo.PaneName =”Pane 2”;
contentInfo.ScreenName =”Primary>”;
contentInfo.SearchScope = aaContent.SearchScope.Self;
ShowContent( contentInfo );
Parameter
ContentInfo
Data type
aaContent.ContentInfo
aaContentInfo.ContentInfo Properties
ContentInfo is a predefined structure that contains the data members described in the following table.
String properties can be a concatenation of string and/or custom properties.
Note: See "Terms," below, for definitions of Content Type, Layout, Pane, Screen Profile, Primary Screen, and Source Screen.
|
Content |
The Content property is a unique name for an item, either in the Visualization folder or associated with an asset, that specifies the content to be loaded into the pane. Content can be a graphic, a layout, or external content. This is a required property of data type string. Content is the name of the item within the Visualization folder or associated with an asset. The content names are the names shown in the Visualization folder. The Properties tab of the Layout and ViewApp editors lists content name as the Content property. Relative names, for example, "Me.S1," can also be used to designate content. If the specified content is already shown, invoking ShowContent again closes the open content and reopens it. However, if the content is a graphic and you are using object wizards that include Symbol Wizard custom property selections, and the graphic has an owning object, use the graphic's absolute name. This allows the correct graphic configuration to be shown for the instance. See Owning Object, below, for more information. Content name must be unique. Application Server does not check for duplicated names. If Content is duplicated, open content with the same name is closed, and the content with the duplicated name is opened in its place. PropertyOverrides and other ContentInfo parameters are updated with any new specified values. If the same content item is used in multiple panes of the layout, and the Content property is specified by the HideContent() method, all instances of the content item are hidden. To specify a single instance, use the Name property instead. Example: contentInfo.Content = "UserDefinedObject_001.Symbol_001"; |
|
Name |
Name is an auto-generated (or user-edited) identifier of a unique content item. The name is created when the content item is added to a layout pane. This is an optional property of data type string. Name must be unique within a layout. Name can be duplicated in nested layouts, as long as the name is not duplicated within a nested single layout or the top level layout. If content with the same Name is open within the SearchScope, the matching, open content is closed. A new instance of the matching content opens in the pane specified by the ShowContent call. When Name is specified in a HideContent call, only the uniquely-named content is closed. If Content is specified and the Name property is not specified, all items in the layout with the same content name are hidden. Example: contentInfo.Name = "Symbol_011"; |
|
ScreenName |
ScreenName specifies the screen that contains a pane in which to place the content. This is an optional property of data type string. ScreenNames are configured in the Screen Profile Editor. See Screen Profiles in the AVEVA OMI Help for additional information. Example: contentInfo.ScreenName = "Wall"; |
|
PaneName |
PaneName specifies the pane in which to place the content. This is an optional property of data type string. PaneNames are configured in the Layout Editor. See Layouts in the AVEVA OMI Help for additional information. Example: contentInfo.PaneName = "Pane1"; |
|
ContentType |
ContentType specifies the content type, for example, "Overview," "Navigation," or "Faceplate." This is an optional property of data type string. ContentType is matched against the Content Type parameter that can be set for a pane in the Layout Editor. ContentType is used to override the actual type of the specified Content. If ContentType is not specified, Content is examined for its type of content. See Layouts in the AVEVA OMI Help for additional information about content types. Example: contentInfo.ContentType = "Overview"; |
|
SearchScope |
SearchScope specifies which screen or screens will be searched for a pane that matches the specified PaneName or ContentType when ScreenName has not been specified. This is an optional property of data type enum. The default value for SearchScope is "Self." SearchScope is an enum with the following values:
|
|
PropertyOverrideValue |
PropertyOverrideValue is a ValuePair[] array that is used to set custom property overrides if a graphic has been specified by the Content property. Each override must include the custom property name and the override value. This is an optional property of data type ValuePair[]. Property overrides are specified as a key-value pair, with the property name enclosed in quotes. Example: Dim cpValues [2] as aaContent.PropertyOverrideValue; cpValues[1] = new aaContent.PropertyOverrideValue("CP1", "20", true); cpValues[2] = new aaContent.PropertyOverrideValue("CP2", "Pump.PV.TagName", false); |
|
OwningObject |
OwningObject sets the owning object of the content shown by the ShowContent() script function. This is an optional property of data type string. OwningObject can be a concatenation of constant strings and reference strings, and can be browsed using the Display Automation Object Browser. You can also type the name of the owning object. The OwningObject property sets references for the graphic, but is not associated with the GraphicName property, if the graphic is part of an Object Wizard. Therefore, if you are scripting
a graphic with an owning object, specify the owning object name as part of the GraphicName property, for example, Example: contentInfo.OwningObject = "Enterprise"; |
Summary of ContentInfo properties
|
Property Name |
Required (y/n) |
Data Type |
Default Value |
|---|---|---|---|
|
Content |
Yes |
String |
None |
|
Name |
No |
String |
None |
|
ScreenName |
No |
String |
None |
|
PaneName |
No |
String |
None |
|
ContentType |
No |
String |
None |
|
SeachScope |
No |
Enum |
Self |
|
PropertyOverrides |
No |
ValuePair[] array |
None |
|
OwningObject |
No |
String |
None |
Terms
Content type: specifies the type of content represented by a pane.
Content: the name of a graphic, layout, or external content item as it is listed within the the Visualization folder. This is displayed as the Content property in the Layout Editor when the content item is added to a layout.
Name: the unique name assigned to an instance of a content item, when it is added to a layout. This is displayed as the Name property in the Layout Editor when the content item is added to a layout, and can be edited.
Layout: consists of one or more rectangular areas called panes that contain content shown in a ViewApp. A layout is associated with a screen, or it can be embedded within a pane of another layout.
Embedded or Nested Layout: In the context of ShowContent and HideContent, an embedded layout is a layout that is placed inside a pane of a containing layout. When SearchScope is "Self" (default), embedded layouts are searched for content that matches the parameters specified in the ShowContent/HideContent call.
Pane: rectangular area of a layout that can hold a single piece of content.
Primary screen: represents the main screen of a workstation that will show a running ViewApp
Screen Profile: defines the physical characteristics of one or more client workstation screens that will show a running ViewApp and how these screens are arranged with respect to each other.
Source screen: screen from which ShowContent or HideContent was called.
Example
Show content in a pane
dim contentInfo as aaContent.ContentInfo;
Dim cpValues [2] as aaContent.PropertyOverrideValue;
cpValues[1] = new aaContent.PropertyOverrideValue("CP1", "20", true);
cpValues[2] = new aaContent.PropertyOverrideValue("CP2", "Pump.PV.TagName", false);
contentInfo.Content = "Symbol1";
contentInfo.Name = "S12";
contentInfo.ContentType = "Overview";
contentInfo.OwningObject = "Enterprise";
contentInfo.PaneName = "Pane 1";
contentInfo.ScreenName = "Wall";
contentInfo.PropertyOverrideValues = cpValues;
contentInfo.SearchScope = aaContent.SearchScope.PrimaryScreen;
ShowContent ( contentInfo );