You are currently reviewing an older revision of this page.
Property watchers are used to set property values or domain lists based on input from a different property. In this example, property watchers are being used to add the values of two properties together to compute the value for a third property.
As shown by the Place Widget dialog, the value of Combined_Property is the sum of Property_A and Property_B.
To do this, create the three properties shown above and define a Property Watcher for Property_A and Property_B as shown.
Name: A name of your choice
Type: SynchItem
Feature: The name of the feature that will be updated
Property: The property of the feature that will be updated
Value Type: expressionEvaluator
Value To Set: Widget.RootFeatureProperties.Property_A+Widget.RootFeatureProperties.Property_B
Redraw Watcher: Enabled
Then created the Computed_Property, and set to read-only. In the Initial Values section, create a new key for Read. Note that this value is not available in the interface and must be keyed in. Read is used when a feature is read from the design file.
Set the following for Read and Placing:
ValueType: expressionEvaluator
Value: Widget.RootFeatureProperties.Property_A+Widget.RootFeatureProperties.Property_B
Note:
Ensure that properties on which calculations are based, actually have values. You can use Initial Values to assign a default value for the placing key.
Attached is a sample schema you can use for testing:
Property Watcher for Computed Value.zip