Navigation:  Basic Concepts >

Element Property, System Property and User Defined Property

Previous pageReturn to chapter overviewNext page

Property is variable in the plot that can store some data for simulation usage. You can change property value with actions (if it is writable), and you can retrieve its value with special syntax (see below) in the fields that support expression.

There are three kinds of properties in ForeUI:

Element Property
System Property
User Defined Property (Custom Property)

When you define the behavior for your prototype, you will see the insert_prop_button button in many cases.  This button indicates the input field aside can support expression, where you can insert any type of property and even make some calculations inside.

insert_prop_to_field

Element Property

The element property belongs to element, and its value can be retrieved via {ElementId.PropertyName} syntax in the expression.

Details of all supported element properties can be found here.

For example, the "Show Message" action below will show the location of Button_1 element.

show_button_location

 

Remarks: the element property will be updated automatically according to element's status, it is read-only for you.

System Property

The system property is variable that reflects the environment for simulation running (such as screen size, current time etc.), and its value can be retrieved via {PropertyName} syntax in the expression.  Usually its name only contains capital characters.

Details of all supported system properties can be found here.

Here's an example, the "Show Message" action below will show the current date in yyyy-mm-dd format:

show_current_date

 

Remarks: the system property will be updated automatically according to system status, it is read-only for you.

User Defined Property (Custom Property)

The user defined property is variable that defined by the user, and its value can be retrieved via {PropertyName} syntax in the expression.   Usually its name only contains lower-case characters.  Its value can be set or updated in the Custom Property View , or by the "Set Global Property" action, so it is writable.

Below is an example of using the "Set Global Property" action to set a custom property named "tmp" to value 1234.

set_custom_property_tmp

 

And below is an example of retrieving the previous defined custom property and display its value in a popup message box:

get_user_prop_example