CustomPopupMenu Class — NXOpen Python API Reference 12.0.0 documentation

# CustomPopupMenu Class

class `NXOpen.``CustomPopupMenu`

  Bases: `NXOpen.CustomPopupMenuItem`

  Represents Custom Popup Menu Item class

  New in version NX6.0.4.

# Methods

Method | Description
--- | ---
AddMenu | Adds and returns a menu to this menu
AddMenuItem | Adds and returns a menu item to this menu
AddMenuSeparator | Adds a separator in the submenu
Dispose | Frees the object from memory.
GetId | Returns Id of the menu item.
GetName | Returns name of the menu item.
SetDisabled | Sets the menu disabled

# Method Detail

## AddMenu

`CustomPopupMenu.``AddMenu`

  Adds and returns a menu to this menu

  Signature `AddMenu(menuId, menuName)`

  Parameters:

  - menuId (int) – Id of the menu
  - menuName (str) – name of the menu

  Returns: | menu
  Return type: | `NXOpen.CustomPopupMenu`

  New in version NX6.0.4.

  License requirements: None.

## AddMenuItem

`CustomPopupMenu.``AddMenuItem`

  Adds and returns a menu item to this menu

  Signature `AddMenuItem(menuItemId, menuItemName)`

  Parameters:

  - menuItemId (int) – Id of the menu item
  - menuItemName (str) – name of the menu item

  Returns: | menu item
  Return type: | `NXOpen.CustomPopupMenuItem`

  New in version NX6.0.4.

  License requirements: None.

## AddMenuSeparator

`CustomPopupMenu.``AddMenuSeparator`

  Adds a separator in the submenu

  Signature `AddMenuSeparator()`

  New in version NX6.0.4.

  License requirements: None.

## Dispose

`CustomPopupMenu.``Dispose`

  Frees the object from memory.

  After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.

  Signature `Dispose()`

  New in version NX6.0.4.

  License requirements: None.