Skip to main content
A user defined property is a typed variable that belongs to an element. These properties are defined in the External fields section. The following format should be observed:
Type1 Name1;
...
TypeN NameN;
where Name is the name of the variable and Type is its type. When fields are created, they are initialized as follows: numerical fields are initialized with zero values, rectangles and regions are initialized with empty values, etc. Fields may be used in the element to which they belong and in any of the elements located below their element. The value of a field can be changed only in the element to which it belongs, and in other elements it is available as read only. The value of a complex expression that characterizes the hypothesis for an element may be computed and written into this property. This value may be accessed from any of the elements below, without computing it each time it is needed. This reduces the time required to match the FlexiLayout, obviates the need to copy a large expression into each of the elements, and makes the code more readable. To access a field of an element, the full name of the field is used in the following format: ElementName.FieldName (e.g. SearchElements.StaticText1.x). Within an element, its field may be accessed by name: x. In the case of a compound element, its subelements (at any level of nesting) may also access its elements by their short names. Within an element, the names of the fields must be unique. The names of elements of a compound element may not coincide with any of the field names in its subelements (at any level of nesting). Additionally, the names of the fields of a compound element may not coincide with any of the names of its subelements.

Example

This example searches for two address components: city (character string City) and subway station (character string Station). The subway station is specified only if the city is Sydney. To speed up FlexiLayout matching, we specify a fromSydney property for the City element. This property is true if the City element is detected and has the value Sydney, and false in all other cases. Code for the City element: External fields
logic fromSydney;
Hypotheses Evaluation
if( not IsNull and Value.Find( "Sydney" ) >= 0 ) then fromSydney = true;
else fromSydney = false;
Subsequently, we use this property to search for the subway station. To speed up the matching process, we search for the station only if Sydney is detected as the City element. Code for the Station element: Search Conditions
if not City.fromSydney then dontfind;
Note: Because of the fields, elements of the same type are not treated as identical. Thus, constructions of the following type are prohibited:
Let e = SearchElements.StaticText1;
e = SearchElements.StaticText2; // element of the same type