FillColour
The FillColour property of a Mimic object defines the color that is used to fill the area of the object. The fill area is the inner part of the object (every part of the object except for the outline).
The expression for the FillColour property needs to:
- Result in an RGB value. With a defined RGB value, the color is fixed as the specified color.
or
- Associate the FillColour with an OPC color tag for a database item.
Typically, you would animate the FillColour property so that it:
- Is Fixed as a Specific Color
The expression for the FillColour needs to be a Red Green Blue (RGB) value between 0 and 255 for each color component (0-255 for red, 0-255 for green, 0-255 for blue).
The format for the expression is:
RGB(<red value>, <green value>, <blue value>)
For example, RGB (255, 0, 150)
- Is a Specific Color Depending on the Value of Another Object—You can animate the FillColour according to the value for another database item property.
You can set the FillColour so that when an object has a specific value, the FillColour is one color, and when the object has a different value, the FillColour is a different color. For example, If you had a Mimic object that you wanted to be colored red when a digital point was in state 1, and blue when it was in any other state, you would use the CurrentState point property to animate the FillColour of the Mimic object:
IIF ("<Point Name and Path>.CurrentState" = 1, RGB (255, 0, 0), RGB (0, 0, 255))
Where <Point Name and Path> are the location and name of the point that you want to use to determine the color of the Mimic object. Do not enter the angle brackets < >.
The CurrentState is the point property that defines the state of the point. So, when the CurrentState is 1 (that is, the point is in state 1), the FillColour will be RGB 255, 0, 0 which corresponds to Red 255, Green 0, Blue 0 (i.e. red). If the point is not in state 1, the FillColour will be RGB 0, 0, 255 which corresponds to Red 0, Green 0, Blue 255 (blue).
- Is Associated with the State Colors of a Database Item
Each database item has a color palette that you can use to choose colors to represent the item’s various states. For example, you could use a point’s color palette to choose black as the color used to indicate Bad Quality. Each of the colors on an item’s color palette has a corresponding OPC color tag.
By referencing an OPC color tag in an expression, you can associate the FillColour with a specific color setting for a specific database item. This can reduce the amount of configuration required should the color be changed at a later date—if you change the color on the Color Palette, the change is also applied to the relevant OPC color tag. So those expressions that reference the color tag are set to use the new color automatically. If a fixed RGB color was used instead of an OPC color tag, you would need to change the color manually in each expression.
To associate the FillColour property with an OPC color tag:
- Display the Expression window for the FillColour property (see Using the Expression Window)
- Position the cursor at the location in the expression where the color is to be inserted. If you highlight part of the expression, the color will replace the highlighted code.
- Select the browse button to display a context-sensitive menu.
- Select the OPC Tag option to display the Select Tag dialog box.
- Browse to the database item that has the color property you want to reference.
- Expand the item’s Color Palette branch.
- Select the Color Palette property that you want to reference, and then select the OK button. A reference to the chosen color tag is inserted in your expression. The color represented by the tag will change whenever a user changes that color property on the color palette. For example, if you select the Future Data>Color tag for a point, the FillColour property is associated with the Future Data setting on that point’s Color Palette. If a change is made to the point’s Future Data color setting (on the color palette), the Mimic animation updates with the new color automatically. This is because the expression references the OPC color tag, not the color itself.