Table of contents
TOC
折叠目录
展开目录

ValidationRuleSets.AddCopy 方法 (Visio)ValidationRuleSets.AddCopy Method (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

将现有的ValidationRuleSet对象的一个副本添加到文档的ValidationRuleSets集合。Adds a copy of an existing ValidationRuleSet object to the ValidationRuleSets collection of the document.

语法Syntax

表达式AddCopy(规则集NameU )expression . AddCopy( RuleSet , NameU )

表达式_一个表示ValidationRuleSet对象的变量。_expression A variable that represents a ValidationRuleSet object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
规则集RuleSet必需RequiredValidationRuleSetValidationRuleSet要复制和添加到规则集的集合的现有规则集。The existing rule set to copy and add to the collection of rule sets.
NameUNameU可选OptionalStringString要分配给新验证规则集的通用名称。The universal name to assign to the new validation rule set.

返回值Return Value

ValidationRuleSetValidationRuleSet

注解Remarks

如果您传递一个可选的_NameU_参数的值时,新的规则集的名称NameU属性分配值。如果没有传递值,Microsoft Visio 将分配新的规则集现有规则集的本地和通用名称。在这种情况下,如果您复制文档中的规则集,Visio 将覆盖现有的规则集。但是,如果您要复制到另一个文档规则集,Visio 将添加到其他文档的新规则集和离开现有的规则集不变。If you pass a value for the optional NameU parameter, both the Name and NameU properties of the new rule set are assigned the value. If you do not pass a value, Microsoft Visio assigns the new rule set the local and universal name of the existing rule set. In that case, if you copy a rule set within a document, Visio overwrites the existing rule set. However, if you copy a rule set to another document, Visio adds a new rule set to the other document and leaves the existing rule set unchanged.

同样,如果_NameU_传入的值匹配的文档中的现有规则集的通用名称,Visio 将覆盖现有的规则集。Similarly, if the value that you pass for the NameU matches the universal name of an existing rule set in the document, Visio overwrites the existing rule set.

如果_NameU_参数不是有效的字符串,则 Visio 返回参数无效错误。If the NameU parameter is not a valid string, Visio returns an Invalid Parameter error.

© 2018 Microsoft