### Inserting Groups

When you insert your first group command into the part program, PC-DMIS gives it a default name of "GRP1" inside Command and DMIS modes or "GROUP - GRP1" inside Summary mode. PC-DMIS then increments the number in the ID for each additional Group. You can easily modify the name of the group to something more descriptive by simply typing a new ID in Command or DMIS modes, or by pressing F9 and editing the GROUP command that way.

There are several different ways to insert groups into the PC-DMIS part program:

- The Insert | Group menu item.
  This inserts the GROUP and ENDGROUP commands. If you selected a group of commands before selecting this menu item, they would be placed inside of the group. In Command and DMIS modes, this means the GROUP command would precede the very first selected command and the ENDGROUP command would follow the last selected command. If you don't have any commands selected, PC-DMIS will display a dialog box asking if you want to insert the command pair without any features inside it. This menu item works in any mode of the Edit window.

- The Right-click shortcut menu.
  Right-click inside Command or DMIS mode, and select Group from the shortcut menu. If you selected a group of commands before selecting this menu item, they would be placed inside of the group. In Command and DMIS modes, this means the GROUP command would precede the very first selected command and the ENDGROUP command would follow the last selected command.

- Summary Mode.
  Right-click inside Summary mode, and select Add Command. From the list of commands, select Group. This will insert an empty GROUP / ENDGROUP command pair. Groups appear as folders inside Summary mode. Commands appear indented inside those folders. You can expand or collapse these groups by clicking on the plus (+) and (-) keys respectively. The ENDGROUP is hidden in Summary mode.

- Type the Command.
  In Command or DMIS modes, simply type GROUP and press ENTER or TAB. PC-DMIS will insert an empty GROUP / ENDGROUP command pair.

| PC-DMIS will make the Group menu item unavailable for selection if you try to group something that is not allowed, such as attempting to only group a portion of a command's block.