Share via


Shapes.ItemFromUniqueID Property (Visio)

Returns the Shape object that matches the specified UniqueID property value. Read-only.

Version Information

Version Added: Visio 2010

Syntax

expression .ItemFromUniqueID(UniqueID)

expression A variable that represents a Shapes object.

Parameters

Name

Required/Optional

Data Type

Description

UniqueID

Required

String

The unique ID of a Shape object.

Return Value

Shape

Remarks

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.

Unique IDs are GUIDs. They are unique within the scope of the document.

To convert between shape IDs and unique IDs, you can use two methods of the Page object, ShapeIDsToUniqueIDs and UniqueIDsToShapeIDs.

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.

If a Shape object has a unique ID, no other shape in the same document will have the same ID.