HideContent()
- Last UpdatedAug 14, 2025
- 6 minute read
Closes one or more matching content items within an AVEVA OMI ViewApp. Multiple content items can be closed if they match the parameters that are specified in the HideContent call. The HideContent() function uses a subset of the parameters that ShowContent() uses.
The HideContent() function works only within a single level of the layout, and the level is defined by the SearchScope parameter. By default, SearchScope is "Self," and searches within the layout that has invoked it. This function is available within any Industrial Graphics client script or AVEVA OMI layout script. SearchScope parameters other than "Self" constrain the search for content to only layouts that are directly associated with the Screen Profile, and not a nested layout. (A nested layout is a layout embedded or contained in a pane of another layout.)
Note: While the HideContent() function is available in object scripts through both IntelliSense and the IDE function browser, its use in object scripts is not supported.
Category
Graphic Client
Syntax
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;
HideContent( contentInfo );
Parameter
ContentInfo
The description of the content, along with the location of the content (screen and pane) to be hidden.
Data type
aaContent.ContentInfo
aaContentInfo properties
You must pass the ContentInfo parameter in the HideContent call (i.e., HideContent ( contentInfo )), even if you do not define any ContentInfo properties. No properties are required; the ContentInfo properties that can be specified optionally are:
|
Content |
Content 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. It can be a graphic, a layout, or external content. This is an optional 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. The Content name must be unique. Application Server does not check for duplicated names. If Content is duplicated, all content with the same name is closed. 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 hide a single instance of a content item that appears more than once in the layout, use the "Name" property instead. Example: contentInfo.Content = "UserDefinedObject_001.Symbol_001"; |
|
Name |
Name is the auto-generated (or user-edited) name of a unique content item. Name is created when the content item is added to a layout pane. When Name is specified, all other property values are ignored. This is an optional property of data type string. Name must be unique within a layout and cannot be duplicated in multiple panes. 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. The aaContentInfo Name property is shown in the Properties tab of the Layout Editor, and is auto-generated from the Content property, also shown in the Properties tab. You can edit the Name property. 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. If both are specified, only Name is used by HideContent() and Content is ignored, as are all other property values. Example: contentInfo.Name = "Symbol_011"; |
|
ScreenName |
ScreenName specifies the screen that contains the pane with the content to be closed. 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 containing the content to be closed. 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 of the content to be closed, for example, "Overview," "Navigation," or "Faceplate." This is an optional property of data type string. ContentType is matched against the Content Type property 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 OM Help for additional information about content types. Example: contentInfo.ContentType = "Overview"; |
|
SearchScope |
SearchScope can be used when when ScreenName has not been specified. SearchScope sets which screen or screens will be searched for a pane that matches the specified PaneName or ContentType. This is optional property of data type enumuration. The default SearchScope is "Self." The following values are valid with SearchScope:
|
|
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 used for relative referencing. It can be a concatenation of constant strings and reference strings. You can browse for the OwningObject using the Display Automation Object Browser, or you can 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, as shown in the following example: Example: UserDefined_001.Pump_001. |
Summary of supported ContentInfo properties
|
Property Name |
Required (y/n) |
Data Type |
Default Value |
|---|---|---|---|
|
Content |
No |
String |
None |
|
Name |
No |
String |
None |
|
ScreenName |
No |
String |
None |
|
PaneName |
No |
String |
None |
|
ContentType |
No |
String |
None |
|
SearchScope |
No |
Enumeration |
Self |
|
OwningObject |
No |
String |
None |
Examples
Dim contentInfo as aaContent.ContentInfo;
contentInfo.Name = “Symbol21”;
HideContent( contentInfo );
Where "Symbol21" is the Name property of the content shown in the Layout Editor.
Dim contentInfo as aaContent.ContentInfo;
contentInfo.Content = “Symbol_001”;
HideContent( contentInfo );
Where "Symbol_001" is the name of the content as listed in the Visualization folder.
Dim contentInfo as aaContent.ContentInfo;
HideContent( contentInfo );
When ContentInfo does not define any properties in the HideContent call, the nested
layout that called it is hidden. In this case, it works identically to the HideSelf method. See HideSelf() for more information.
If HideContent() with no ContentInfo properties is called from the top level of a layout, it has no effect; that is, the top level layout is not closed.
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.