Graphic item parameters are very similar to the parameters of PROMOTIC object.
If there are some item parameters then these parameters (including values) are displayed in the status bar of the panel editor while the mouse pointer hovers over the item.
The parameter can be read:
Both approaches read parameter the cascade way (bubbling), i.e. if item (in which the macro is used), does not have this parameter, then this parameter is searched in its parents (in the immersed item) and finally it is searched in PmiRoot item.
The parameter is mainly used for configuration of graphic item data binding. In this case the graphic item (compound or single) can have more data bindings defined using this parameters such way, that the configuration change of parameter value will change the references to items in this data bindings. Another possible usage of parameter is for text parametrization in PmiText, PmiButton, etc. items.
The exception are the parameters of PmiRoot graphic item. These parameters (opposed to the parameters in other graphic items) can be modified when the panel is opened. Then, after the panel is open, these parameters are static and cannot be modified. The parameter values of panels that are being open can be defined in two ways:
The main purpose of item parameters is related to creation of item interface. It is very easy to change the parameter value after copying the item, so it displays the data, for example, not for "Boiler1" but for "Boiler2". This way the item parameters make the creation of often used user graphic items in panel editor much easier.
The resulting displayed text: Temperature in boiler 1
Let´s have following data in the application: "/Boiler1/Data" and "/Boiler2/Data" of the same PmData type. Both objects contain predefined variable "Temperature. Additional two items displaying both temperatures are located in the /PanelBoiler panel. If another object is added in the future, e.g. Boiler3, then the new item created just by copying the existing item should display the temperature of the new object.
This way the graphic item is configured properly. Now it is possible to copy the graphic item and just by changing the parameter value BoilerNum to 2 in this copy, to let the graphic item display the value of /Boiler2/Data/#vars/Temperature. Any time in the future it is possible to change the graphic item parameter and thus change the target object of the displayed value.
Let´s have following data in the application: "/Boiler1/Data" and "/Boiler2/Data" of the same PmData type. Both objects contain predefined variable "Temperature. There is the /PanelBoiler panel that displays the temperature of "Boiler1" or of "Boiler2" (according to the open window parameters).
This way the panel is filled in correctly. Now you just have to assure to open the panel always with the correct parameter. For example create another panel that will be used for opening the /PanelBoiler panel. Insert two buttons (graphic item PmiButton) into this panel. The first button will open the panel for "Boiler1", the second button will open the same panel but for "Boiler2". Into the event onButtonUp of the first button enter this script:
Into the same event of the second button insert similar script:
Launch the application and open the panel with buttons. By pressing the first button the window for "Boiler1" is opened, by pressing the second button the window for "Boiler2" is opened.