This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IC > ICommandPool Interface > ICommandPool.UID Property (ArcObjects .NET 10.4 SDK) |
The UID of the given command. May return nothing.
[Visual Basic .NET] Public Function get_UID ( _ ByVal Command As ICommand _ ) As UID
[C#] public UID get_UID ( ICommand Command );
[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
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.
1036 800a040c: The supplied command does not exist in command pool
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());
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)