ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / CoreModule Class / GetSuggestedCMDIDs Method
The id of the tab to retrieve the command id list for
Example

In This Topic
    GetSuggestedCMDIDs Method (CoreModule)
    In This Topic
    Gets the suggested daml ids for the given tab identified by 'activeTabID'
    Syntax
    Public Overrides NotOverridable Function GetSuggestedCMDIDs( _
       ByVal activeTabID As String _
    ) As String()
    public override string[] GetSuggestedCMDIDs( 
       string activeTabID
    )

    Parameters

    activeTabID
    The id of the tab to retrieve the command id list for

    Return Value

    An array of daml ids
    Example
    Suggested command options in CommandSearch when a tab is activated.
    {
      //In the module class..
    
      //Return the static list of daml ids you want to be the (suggested) 
      //defaults relevant to the given tab. It can be none, some, or all of the
      //commands associated with the activeTabID.
      //In this example, there are two tabs. This example arbitrarily
      //identifies just one command on each tab to be a default to show in the
      //command search list (when _that_ particular tab is active)
      switch (activeTabID)
      {
        case "CommandSearch_Example_Tab1":
          result = ["CommandSearch_Example_Button2"];
          break;
        case "CommandSearch_Example_Tab2":
          result = ["CommandSearch_Example_Button4"];
          break;
      }
      result = [""]; // Default case
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also