Embedded module

An embedded module is a module embedded within a panel for displaying further panels in this module.

Figure 1. Embedded module

To create an embedded module

  1. Click on the embedded module symbol in the GEDI.

  2. Click in the panel work area. Specify the size.

  3. Open the Property Sheet

  4. Enter the object name (Name).

  5. On the "Standard" tab, specify the attributes such as color. On the "Extended" tab, specify embedded module specific attributes such as "frameShadow" and "frameShape". In the table below you can find further attributes available for the embedded module.

The following attributes can be used to create embedded module animations:

"newPanelAnimateOpacity", "oldPanelAnimateOpacity

"newPanelAnimateSize", "oldPanelAnimateSize"

"newPanelAnimDuration", "oldPanelAnimDuration"

"newPanelAnimType", "oldPanelAnimType"

"newPanelEasingCurve", "oldPanelEasingCurve"

You can set these attributes via the property sheet or via a CTRL script.

Figure 2. Animation attributes for Embedded Module

(see also Properties of complex graphics objects and Control/Control Graphics/Embedded module functions). Note that you can disregard all not documented attributes of the embedded module.

A double-click on the embedded module in the panel during engineering opens the Initialize script. The events "Initialize", "Acknowledge", GestureTriggered", "LangChanged", "Resized" and "Scrolled" are available for the embedded module. See chapter Events of graphics objects.

  1. Add the following code to the initialize script of the embedded module. (Replace the panel name in the code with the panel name you want to open).

To open a panel in a module

This script opens the panel manAuto.pnl in the embedded module"TestModule" with the title "Test".

main(bool enter)
{
  this.ModuleName = "TestModule";
  RootPanelOnModule("manAuto.pnl","Test","TestModule","");
}

To zoom a module

In the following example the panel manAuto.pnl is opened in the module "module" and the module is zoomed.

main(bool enter)
{
  this.ModuleName = "module";
  setScaleStyle(SCALE_ZOOM, "module");
  RootPanelOnModule("manAuto.pnl","test","module","");
  ZoomModule("module", 3);
}

Scaling of Embedded Modules

From 3.18 onwards, the scaling behaviour of the WinCC OA UI was changed. The default behaviour inside Embedded Modules is an automatic upscaling of panels which are smaller than the module they are loaded in. This behaviour can be deactivated by placing the function setScaleStyle() with the following parameters in the "Init" script of the Embedded Module before the panel is loaded.

setScaleStyle(SCALE_NONE, this.ModuleName);