Applies To:
  • CitectSCADA 3.4, 4.2, 5.0

Summary:
When a genie that has an attached (bound) super genie (for example a pushbutton that brings up a super genie popup) is pasted onto another genie (genie A say) and genie A is pasted into a page, the super genie is not created in the project. Thus, when the pushbutton is pressed at runtime a "Cannot Open Window" error is generated. 

Solution:
All genies that reference a super genie (either directly, via Assxxx function calls, or indirectly through a sub-genie) should be attached (bound) to the referenced super genie. Only by doing this can it be ensured that when the genie is pasted onto a page in the Graphics Builder, a system page for the referenced super genie is automatically created. If the system page for the super genie is not automatically created, then the 'Cannot Open Window' error will be generated at runtime.

To attach a super genie to a genie, open the genie and select the Attach Super Genies menu item from the Edit menu. Add any super genies referenced by this genie.

The following example illustrates how to create a genie containing a genie with an attached super genie correctly:

  1. Create a genie and place a button on the genie.
  2. In the command field of the button type AssPopUp(super genie name, var1, varN) to attach (bind) the super genie to the genie. (e.g. AssPopUp("!SG1_OpenClose","%TAG%_CMD","%TAG%_M"))
  3. Attach the super genie to the genie. Select the Attach Super Genies menu item from the Edit menu. Save this genie as GenieA.
  4. Create another genie and paste genieA on the new genie.
  5. Attach the super genie already attached to genieA to the new genie. Select the Attach Super Genies menu item from the Edit menu. Save this genie as GenieB.

Now if GenieB is pasted onto a page the super genie can be launched correctly.

Notes:

  • In V3.4/4.2, changes to an existing genie can take effect, the genie must be deleted from the Graphics Builder page and pasted again.
  • In V3.4/4.2 when a super genie is attached to a genie the genie becomes classified as a super genie. Therefore, paste super genie must be used instead of paste genie.
  • Previous versions of Citect used the term 'Bind Super Genie' to refer to the process which is now called 'Attach Super Genie'.
  • If the Super Genie page does not appear in runtime or the Graphics Builder, then the following should assist in its recreation.  The Super Genie page is created during the process of pasting the Super Genie onto a graphics page.  That Super Genie needs to be attached to the Genie first.  When it is attached properly, the Super Genie page will be previewed in the attach Super Genie dialog when you proceed to paste the Super Genie.  If the preview does not appear, then check the attachment, delete the attachment, and re-attach, then try pasting again.  After pasting, the pasted Super Genie can be deleted from the page if not required.  Using the Update Pages facility in the Graphics Builder will not create a Super Genie page if one does not already exist; it will only update an existing Super Genie page with current modifications.
 

Keywords:
 

Attachments