<< Click to Display Table of Contents >>
Pump |
Properties of an XObject are usually displayed by an XControl. Users must create an XControl named "Pump", which changes its color to indicate a Status Property, displays a wrench linked to the Failure Property, and gears to indicate the Automatic Property.
Pump
1.Insert a new XControl in this project and name it as "Pump".
2.Insert the Pump_1 figure, which was previously loaded on the Resources folder of the gallery of images. Change the following properties:
•OverrideFillMode to 3 - ByBrightness
•OverrideFillColor to a green color (RGB(0, 100, 0))
NOTE |
Figures from the Resources item in Organizer were added in the External Figures exercise on chapter Screen and Screen Objects. |
3.Insert the Failure and Automatic figures, which are in this project as Resources.
4.Insert a Text under the pump, to display the name "Pump".
5.Create a Property called "PumpSource", with a PumpTag type (the XObject created previously).
PumpTag-type Property
6.To facilitate later, write down on the Help text column the message "Linked PumpTag object. Properties: Status, Automatic, Failure".
7.For the Failure figure to appear only when this valve is on failure, create a Simple Link between the Visible property of this object and the Failure Property:
•Open the Properties Window of the figure representing a wrench and select the Links tab
•Select the Visible property and, using AppBrowser, select the PumpSource Property of the Pump object
•Type, after the PumpSource property, the property of the PumpTag object. In this case, Failure
AppBrowser
8.Repeat the previous procedure between the Automatic object and the Automatic property.
9.In the Text under the valve, the linked PumpTag object's name must appear. Create a Link between Display's Value property and the Pump.PumpSource.Name property.
Value property of the Text object
10.When the Status Property is in True, this pump's color must be green and, when this Property is in False, this pump's color must be red. On the Links tab, create a Digital Link between the OverrideFillColor property and the Status Property.
OverrideFillColor property
11.Save this library and register it.