MenuItem.SetGroupID
-------------------

Sets the group id of the menu item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.SetGroupID"; Item; GroupID ) 

**MBS**( **"MenuItem.SetGroupID";** /\* Sets the group id of the menu item. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$GroupID**) /\* Any string to identify your groups.e.g. "123" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |
| GroupID | Any string to identify your groups. | "123" |

### Result

Returns OK or error.

### Description

Sets the group id of the menu item.  
If several menu items have the same group id, the plugin only shows the first one fulfilling all requirements like key modifiers.  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetGroupID](MenuItemGetGroupID.md)

This function checks for a license.

Created 6th June 2015 , last changed 8th June 2015

  
[MenuItem.SetFontSize](MenuItemSetFontSize.md) - [MenuItem.SetHidden](MenuItemSetHidden.md)

[HTML Version](MenuItemSetGroupID.shtml)