TN IT255 Open a traditional InTouch Window from a Button in an ArchestrA Graphic
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
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.
- From the Graphic Toolbox I'll create a new symbol called OpenTankDisplay.
- Open the new graphic for editing.
- Add a button to the graphic, and set the label to "Show Tank Display".
- Double Click on the Show Tank Display button you just created to display the Animation Links.
- From the + symbol, select Action Scripts.
- Enter the following script:
Dim myGraphicInfo as aaGraphic.GraphicInfo;
myGraphicInfo.Identity = "InTouch:MyTankDisplay";
- Save your graphic.
- Add the OpenTankDisplay graphic to the MyA2Navigation window.
- Switch to Runtime, and click the Show Tank Display button to open the MyTankDisplay window.
To Hide a window, repeat the process but use the following script: