ArcObjects Library Reference  (System)    

UID CoClass

Unique Identifier Object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Interfaces

Interfaces Description
IPersist (esriSystem) Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile.
IPersistStream
IUID Provides access to members that work with globally unique identifier objects.
IXMLSerialize Provides access to members that XML serialize and deserialize an object to/from XML.

Remarks

COM interfaces and coclasses are identified by a globally unique identifier (GUID). The GUID for an interface is called an interface ID (IID). The GUID for a coclass is called class ID (CLSID). A ProgID is a text alias for a CLSID; the ProgID is a string composed of the project name and the class name of the coclass.

The UID coclass can be used to represent the GUID of an object.

There is built-in module called ArcID in the VBA project for the Normal template in both ArcMap and ArcCatalog. This module is a utility for finding the UID of the built-in commands and toolbars. You pass the name of a command or toolbar in as an argument to ArcID and the UID of that item is returned. The ArcID module is regenerated every time the Normal template is loaded; the registry is read to get the GUIDs of all the commands and toolbars that are currently used by the application.

[Visual Basic 6.0]

In the following VB example, u is defined as a new UID object and is set to the CLSID of the ArcMap AddData command. Now, u can be used in any of the methods that require an IUID object.

     Dim u As New UID
     u.Value = "{E1F29C6B-4E6B-11D2-AE2C-080009EC732A}" 

In the following example, u is set to the ProgID of the ESRI Object Editor extension.

     Dim u As New UID
     u.Value = "esriEditor.Editor" 

See Also

IUID Interface