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

AVEVA™ InTouch HMI

PrintWindow() 函数

  • Last UpdatedJan 15, 2020
  • 1 minute read

在脚本中,通过使用 PrintWindow() 函数可以打印 InTouch 窗口。

备注:含有 PrintWindow() 函数的脚本无法在 InTouch 窗口内打印以下工业图形控件:ListBox、DateTimePicker、CalenderControl、EditBox、CheckBox、RadioButtonGroup、ComboBox、AlarmClient 或 TrendClient。

语法

[result = ] PrintWindow (windowname, leftmargin, topmargin, width, height, options);

参数

windowname

要打印的窗口的名称。字符串值、消息标记名或字符串表达式。

leftmargin

左侧边距偏移量(以英寸计)。数值、模拟标记名或数值表达式。

topmargin

顶部边距偏移量(以英寸计)。数值、模拟标记名或数值表达式。

width

打印输出宽度(以英寸计)。将此值设置为 0 可得到最大的纵横比。数值、模拟标记名或数值表达式。

height

打印输出高度(以英寸计)。将此值设置为 0 可得到最大的纵横比。数值、模拟标记名或数值表达式。

options

离散值 0 或 1,仅当 width 与 height 都为 0 时使用。布尔值、离散标记名或布尔表达式。设置为:

1 - 窗口按最大纵横比,也就是窗口大小的整数倍打印。

0 - 窗口按适合页面的最大纵横比打印。

备注:如果窗口包含位图,则将 options 设置为 1 可以防止拉伸位图。

返回值

0 - 打印作业未能成功进入队列,或窗口不存在

1 - 打印作业成功进入队列

In This Topic