ArcObjects Library Reference (Controls)  

ICommandPool.UID Property

The UID of the given command. May return nothing.

ERROR: Syntax information about ICommandPool.UID may not be in D:\ArcGIS\DotNet\ESRI.ArcGIS.Controls.dll

[C++]
HRESULT get_UID(
  ICommand* Command,
  IUID** pVal
);
[C++]

Parameters

Command [in]

  Command is a parameter of type ICommand

pVal [out, retval]

  pVal is a parameter of type IUID

Product Availability

Available with ArcGIS Engine.

Description

Returns the UID of the specified command. The method will return Nothing if the command object has been added to the CommadPool using either the AddCommand or IToolbarControl::AddItem, IToolbarMenu::AddItem or IToolbarPalette::AddItem methods without a UID or ProgID supplied.

Errors Returned

1036 800a040c: The supplied command does not exist in command pool

[C#]

In C# use the get_UID method, as indexed property accessors are not supported.

ICommand command = axToolbarControl1.CommandPool.get_Command(0);
UID uID = new UIDClass();
uID = axToolbarControl1.CommandPool.get_UID(command);
if (uID != null) System.Windows.Forms.MessageBox.Show(uID.Value.ToString());
[Visual Basic .NET]
Dim pCommand As ICommand
pCommand = AxToolbarControl1.CommandPool.Command(0)
Dim pUid As New UIDClass
pUid = AxToolbarControl1.CommandPool.UID(pCommand)
If Not pUid Is Nothing Then System.Windows.Forms.MessageBox.Show(pUid.Value)

See Also

ICommandPool Interface