Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

wcGetItemData() 函数

  • Last UpdatedJan 15, 2020
  • 1 minute read

读取与 ItemIndex 参数所确定的列表项关联的整数值。

类别

Windows 控件

语法

[ErrorNumber=]wcGetItemData("ControlName", ItemIndex, Tagname);

参数

ControlName

Windows 控件对象的名称。例如,ListBox_1。实际的字符串或消息标记名。

ItemIndex

与项目的位置对应的数字。任何数字或整型标记名。

Tagname

实型或整型标记名的实际名称。从函数返回时,wcGetItemData() 函数将该项目对应的数值赋予此标记名。

附注

如需已返回错误号的列表,请参阅理解 Windows 控件错误消息

适用范围

列表框与组合框。

示例

在动作脚本运行时,以下语句检索与列表框中的第五个项目关联的数值,并将它返回给 ItemValue 整型标记名:

wcGetItemData("ListBox_1", 5, ItemValue);

如果给列表中的第五个项目指定了整数值 4500,则 ItemValue 标记名包含 4500。

另请参阅

wcSetItemData()

In This Topic