2024年3月7日发(作者:)
HMIRuntime
The HMIRuntime object represents the graphic runtime environment.
HMIRuntime用于描述图形对象的运行环境
Usage作用
The "HMIRuntime" object can be used for the following, for example:
/ HMIRuntime可以用在一下几种情况中。
Read or define the current runtime language ("Language" property).
/修改组态的语言环境,例如:ge=2052.其中2052代表中文。
Read or define the name of the current basic picture ("ActiveScreen"
property).
/得到当前对象的名称。例如:HMIRuntime.Screens("cmd1")得到对象cmd1的名称。
Access tags ("Tags" property).
/进入变量的使用权,例如;HMIRuntime.Tags("tag1").writ 6。将tag1的值赋值为6
Exit runtime ("Stop" method).
推出WINCC,例如:
Display messages in a diagnostics window ("Trace" method).
/在诊断窗口中显示信息。
The ScreenItem object returns the result of access to the ScreenItems
list.
ScreenItem获取对象的属性
Usage
The ScreenItem object can be used to access the properties of graphic
objects within a picture according to certain events.
The "ScreenItem" object can be used for the following, for example:
To activate or deactivate the visualization of an object ("Visible"
property).
/获取对象的显示属性
/定义是否可用
/定义高度,宽度。
/定义位置
/定义图层
/获取对象名称
To release or block the operation of an object ("Enabled" property).
Change the width and height of an object ("Height" and "Width"
properties).
Change the position of an object ("Top" and "Left" properties).
Read out and define a layer in which a graphic object is located
("Layer" property).
Read out or define the name of a graphic object ("ObjectName"
property).
Define a reference to the superordinate picture ("Parent"
property).
Item Object
Description
The "Item" object provides a reference to the current object.
Usage
The "Item" object is used, for example, to address the properties of the
object currently selected in Graphics Designer.
Example
In the following example, a rectangle has been created. When the object
has been selected, all the properties of the current object can be set
a background color red:
lor = (255,0,0)
Item用于取得当前选中对象的属性。
Usage
The "Tag" object can be used to:
Read out information on the tag ("Name", "QualityCode", "TimeStamp",
"LastError" and "ErrorDescription" properties)
Set a value for a tag ("Write" method, "Value" property)
Read a value for a tag ("Read" method, "Value" property)
Read the value of a "Tag1" tag:
'VBS13
Dim objTag
Set objTag = ("Tag1")
()


发布评论