 |
ALPHA-VISION® Functions: aci.Obj_SetAttr
|
aci.Obj_SetAttr
SUMMARY
Set data object attributes / properties
SYNTAX
aci.Obj_SetAttr(
(<object number>|<point id>),
<attr>,
<value>)
ARGUMENTS
- object number (type:number)
-
A data object number
- point id (type:string)
-
The name of a data object
- attr (type:integer)
-
An identifier for the required attribute.
Use the global table DOATTR.
The names of the elements of DOATTR have the same names as the attributes in the display editor.
Note:
Please note that many attributes are read-only.
- value (type:any)
-
The new value for the attribute.
It must have the required type.
ERROR HANDLING
The function will fail and terminate script execution if strict error checking is enabled (see
aci.SetStrictMode()) and
one of the following conditions is met:
-
The given data object does not exist.
-
The value of the attribute cannot be retrieved.
The normal reason for this is that the data object does not have such an attribute.
If this occurs and strict checking is disabled the function returns
nil.
EXAMPLES
Set the measuring point value of TANKLEVEL to 12
aci.Obj_QueryAttr("TANKLEVEL", DOATTR.Value, 12)
Syntax Notation
- [aaa]
- aaa is optional (zero or one occurences)
- (aaa|bbb)
- aaa exclusive or bbb
- (aaa)*
- aaa may occur indefinitely often or may be omitted
- (aaa)+
- aaa may occur indefinitely often but at least once
- (aaa)m..n
- aaa may occur from m to n times