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

AVEVA™ InTouch HMI

导入覆盖的文本字符串

  • Last UpdatedJun 08, 2026
  • 1 minute read

通过在导入图形之前先编辑导出的 XML 文件的 SubstituteString 元素,可以覆盖已导出图形的文本字符串。

下图显示符号 A 嵌入在符号 B 中。符号 A 包含三个带文本字符串的文本元素。Text1 元素的 TextBox1 文本字符串被覆盖为 Textbox11。然后,使用编程方式 API 导出了符号 B。

Overriding an exported graphic's text strings

导出 XML 文件中的预期 SubstituteStrings 元素应该类似于:

<SubstituteStrings>

<String Old="TextBox1" New="TextBox11" ElementID="A.Text1"/>

</SubstituteStrings>

用户编辑导出 XML 文件并添加要在不使用 ElementID 属性来识别文本元素的情况下覆盖文本字符串的条目。

<SubstituteStrings>

<String Old="TextBox1" New="TextBox11" ElementID="A.Text1"/>

<String Old="TextBox2" New="TextBox22">

</SubstituteStrings>

在导入图形之后,Text2 和 Text3 元素的文本字符串被覆盖为 TextBox22。由于未使用 ElementID 来识别文本元素,字符串覆盖替换了与 Old 属性所指定的文本字符串匹配的所有文本字符串。

Overriding an exported graphic's text strings

如果使用编程方式 API 再次导出图形,那么导出的 XML 文件会显示已将 ElementID 属性添加到每个 String 元素。

<SubstituteStrings>

<String Old="TextBox1" New="TextBox11" ElementID="A.Text1"/>

<String Old="TextBox2" New="TextBox22" ElementID="A.Text2"/>

<String Old="TextBox2" New="TextBox22" ElementID="A.Text3"/>

</SubstituteStrings>