GefContextMenuItem.GetNativeCommandAction (method)

Returns True if the menu item is a native command and retrieves the command id
Syntax: Boolean = object.GetNativeCommandAction ( CommandID )
Parameters:
CommandID As GefMenuCommandIDEnum* -
Description: The GetNativeCommandAction method returns True if the menu item is a native menu action and retrieves the CommandID. Valid values for the CommandID are values of the GefMenuCommandIDEnum.

Example:

Sub OnPreContextMenu(oContextMenu As GefContextMenu)
  Dim oContextMenuItem As GefContextMenuItem
  Dim oContextMenuItems As GefContextMenuItems
  
  Set oContextMenuItems = oContextMenu.MenuItems
  
  For Each oContextMenuItem in oContextMenuItems
    If oContextMenuItem.Type = gefMenuItemTypePointTarget Then
      oContextMenuItem.Enabled = False
    Else
      Dim command As Long
      If oContextMenuItem.GetNativeCommandAction(command) Then
        If command = gefMenuCommand_ID_EDIT_POINTVIEW Then
          oContextMenuItem.Enabled = False
        End If
      End If
    End If
  Next oContextMenuItem
End Sub