11.45 setvalue()

With this function, you can change attributes of objects.

You can find the attributes available for the relevant object type in the “Object Reference”.

Using setvalue() you can change these values without triggering a changed event. This is useful if within a rule a lot of values are to be changed at once with loop constructs. Otherwise you take the risk to overflow the internal setvalue event queue.

Definition

boolean setvalue
(
      object    Obj  input,
      attribute Attr input,
      anyvalue  NewVal input
  { , integer   IntIdx input | index IdxIdx input }
  { , boolean   SendEvent := true input }
)

Parameters

object Obj input
This parameter describes the object whose attribute you want to use.
attribute Attr input
This parameter describes the object attribute which you want to change.
anyvalue NewVal input
In this parameter the value to be adopted by the attribute is specified.
integer IntIdx input
index IdxIdx input
This optional parameter may be either an integer or an index value. It has to be set if a vectorial attribute has to be specified. If a one-dimensional attribute is to be set, a figure has to be specified. If a two-dimensional attribute is to be set, an index has to be specified.
boolean SendEvent := true input
By means of this optional parameter you can control whether the ISA Dialog Manager is to trigger the rule execution by the successful setting of the attribute. The parameter has to be specified as false, if no events are to be sent. If events are to be sent, the parameter has to be specified as true or has to be omitted.

Return value

true
Setting the attribute has been carried out successfully.
false
The attribute could not be set.

Examples

See also

Method :set()

C function DM_SetValue in manual “C Interface - Functions”