This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IC > ICommandBar Interface > ICommandBar.Add Method (ArcObjects .NET 10.4 SDK) |
Adds a new command to this commandbar.
[Visual Basic .NET] Public Function Add ( _ ByVal cmdID As UID, _ [ByRef Index As Object] _ ) As ICommandItem
[C#] public ICommandItem Add ( UID cmdID, ref object Index );
Optional Values
cmdID specifies the unique identifier of the command that is to be added to the commandbar.
Index specifies the postion on the commandbar at which this item is to be added. [Optional]
In VBA, you can use the built-in ArcID module to find the unique identifier for a particular command or commandbar.
ICommandBar Interface | ICommandItem Interface | IUID Interface