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

Shapes.ItemFromUniqueID 属性 (Visio)Shapes.ItemFromUniqueID Property (Visio)

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

返回Shape对象,该对象指定的UniqueID属性值相匹配。只读的。Returns the Shape object that matches the specified UniqueID property value. Read-only.

语法Syntax

表达式ItemFromUniqueID( UniqueID )expression . ItemFromUniqueID( UniqueID )

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

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
UniqueIDUniqueID必需RequiredStringStringShape对象的唯一 ID。The unique ID of a Shape object.

返回值Return Value

形状Shape

注解Remarks

Microsoft Visio 标识形状由两个不同的 Id: 形状 Id 和唯一的 Id。形状 Id 是数值,范围单个绘图页或主控形状内的形状进行唯一标识。他们不是绘图的唯一,范围内但是。Microsoft Visio identifies shapes by two different IDs: shape IDs and unique IDs. Shape IDs are numeric and uniquely identify shapes within the scope of an individual drawing page or master. They are not unique within the scope of the drawing, however.

唯一 ID 是 GUID,在文档范围内是唯一的。Unique IDs are GUIDs. They are unique within the scope of the document.

要将形状 Id 和唯一 Id 之间的转换,可以使用两种方法的Page对象, ShapeIDsToUniqueIDsUniqueIDsToShapeIDsTo convert between shape IDs and unique IDs, you can use two methods of the Page object, ShapeIDsToUniqueIDs and UniqueIDsToShapeIDs .

默认情况下,形状不具有唯一的 id。仅当您接到其只读的UniqueID属性值通过调用该形状,该属性传递visGetOrMake常量VisUniqueIDArgs枚举,形状获得一个唯一的 ID。By default, a shape does not have a unique ID. A shape acquires a unique ID only if you get its read-only UniqueID property value by calling the property on the shape, passing it the visGetOrMake constant from the VisUniqueIDArgs enumeration.

如果Shape对象具有唯一 ID,则同一文档中的任何其他形状将不具有相同的 id。If a Shape object has a unique ID, no other shape in the same document will have the same ID.

© 2018 Microsoft