Skip to main content
InSource Solutions

TN IT255 Open a traditional InTouch Window from a Button in an ArchestrA Graphic

InSource_Logo_Transparent.png

Description

 

This article from InSource shows how you can use ArchestrA graphic scripting to display a traditional InTouch Window on the screen.  This can be useful for building Navigation.

  • Author: Dillon Perera
  • Published: 02/09/2017
  • Applies to: InTouch 2014R2

Details

When using ArchestrA graphics you are given animation links to Show or Hide Symbols, but not to Show or Hide Windows.  The ability to open a traditional InTouch window from an ArchestrA graphic makes it easier for users to bridge the gap between old and new development.

In the example presented, I have two Windows:

- MyTankDisplay - This is a basic InTouch window, utilizing Symbol Factory graphics, to display the fill level on a tank.

- MyA2Navigation - This will start as a blank window, intended to be used for navigation.  I will walk through creating a new ArchestrA graphic, adding a button to it, and placing a script on the button to open the MyTankDisplay window. 

clipboard_e6572d07775c487539d386deaa65413b5.png

 

Steps:

  1. From the Graphic Toolbox I'll create a new symbol called OpenTankDisplay.
    clipboard_ec10017ed8645bebf8b8bb279e0dcc18b.png
     
  2. Open the new graphic for editing.
  3. Add a button to the graphic, and set the label to "Show Tank Display".
    clipboard_e04de01473806f67e21ed5dae0a7a7ac5.png
  4. Double Click on the Show Tank Display button you just created to display the Animation Links.
  5. From the + symbol, select Action Scripts.
    clipboard_ee1fe19c4993943b0ecd7a5bc887c5c98.png
  6. Enter the following script:
    Dim myGraphicInfo as aaGraphic.GraphicInfo;
    myGraphicInfo.Identity = "InTouch:MyTankDisplay";
    ShowGraphic (myGraphicInfo);

    clipboard_e2727cb733a9681a2c92186a0939b00fc.png
     
  7. Save your graphic.
  8. Add the OpenTankDisplay graphic to the MyA2Navigation window.
    clipboard_e22d0d7d19d15621db3e0b4dee0371fa4.png
     
  9. Switch to Runtime, and click the Show Tank Display button to open the MyTankDisplay window.
    clipboard_e9dcaa2836da9e2e187d1baf9333f070e.png

 

To Hide a window, repeat the process but use the following script:

HideGraphic("InTouch:MyTankDisplay");

clipboard_e0e6cc864c94b0709c921b0e977f51670.png