Graphic Display Element Navigation
In our project using 800xA 5.1, PG2 graphics, we would like to create a Graphic element containing all aspect view buttons for display navigation. This graphic element will be addedd in all graphic displays instead of adding aspect view buttons in each and every page individually.
By doing the above, how to changes the color of a aspect view button when respective graphic page is opened by clicking the aspect view button from the graphic element.
Voted best answer
There are many ways to do this, but we have used this method on a couple of sites. To change the background color of a display link is easily done with an expression. The trick then is how to use the expression to identify which display is open.
You will find this job easier if you properly organize your graphic displays into objects in the Functional Structure. For example, you might create one "Area" or "Cell" object for each process graphic that you want. ( For one site, we created an "Operator Graphic" object and gave it some trend aspects and alarm list aspects which are then copied or inherited from the object type. Another option is to break down every process area into control structure objects and link the operator graphics to the control software that way)
The "Area" or "Cell" object contains one - and only one - operator graphic as well as any trend displays, alarm lists, overlay displays, etc and any other related information like operating instructions, and other documents. Once this is done, your expression can easily recognize what Object the operator graphic belongs to and hence which page link should be highlighted.
As you suggest, create your page links as a graphic element aspect. Then put one instance of the graphic element aspect into each graphic. You can also make your display link graphic element even more flexible by reading a list of display object names from a "General Properties" aspect.
A simple solution:
Add an Input Property (Name example: ActiveButtonNr (Integer)) in to your Grapic Element with the Navigation Buttons. Each button should have a Number. You can use that Property in the Expressions of the buttons. (E.g. BackgroundColor of Button 1: IF ActiveButtonNr = 1 then blue else red)
When you add this Graphic Element in your Graphic Display you can find this new Property. Write the number of the button that should be active in this graphic display in the new Property: ActiveButtonNr
One thing to check out is the aspect view button that came with a "history" option. This came in 5.1 fp1 I believe. It shows that the last graphic called up was the one that you are on, so you don't call up the same graphic. This is similar to how IE shows a different color for links you've called up.