Customize Portal States

From Planimate Knowledge Base
Jump to navigation Jump to search

Customization of Portal States

The Customise States Portal Data menu option enables you to replace the standard Portal States (Idle, Busy) with a set of states that you define yourself.

For each state you can select a state name, a value and an icon.

Customised states are changed by operations in routine code.

Adding States

After selecting Customise States, a window appears in which you add and edit the Portal states.

State Editor Blank.jpg


Then you will be offered a window from which you can select an icon the portal will display when it is in this state.


Icon Palette.jpg


After you select an icon, the state is added to the list.

  You can then right click on a state to edit its other state parameters:

  • Name
    Optional, but it is useful for remembering the state
  • Index
    An integer value. Change this to re-order the state listing.
  • Colour
    This is the color name that is reported to the Log outputs.


State Editor.jpg


Changing States During a Run

Changing of the Standard Portal States is handled automatically for you by Planimate.

Once you specify Custom States, then you are responsible for managing the changing of these states. Portal State changes are changed through routine code.

The following examples show how to change Portal state in a routine in a change object.

CurrentScreenStatus.jpg


Displaying Portal States as Text (Labels)

You may wish to display text labels for each state as well as an icon image.

To do this, you need to:

  1. Prepare a label list with the text labels you want to associate with the state.
  2. Create an Attribute or Table in which to record the state value.
  3. Provide a view of this attribute or table cell on a panel or screen.

In the same routines above, you can add extra operations to set the attribute to match the state.

Note:

Once you elect to customize portal states, the standard states are not used. You can revert to the standard states if you delete all customized states you have added.