groupSelection method
This command adds a copy of #archetypeGroupData to the diagram's model
to create a new Group and then adds the selected Parts to that new group.
This is normally invoked by the Ctrl-G
keyboard shortcut.
This creates a new Group by adding a copy of the #archetypeGroupData to the model. Each of the selected parts for which Part#canGroup is true and for which #isValidMember is true is made a member of that new group. If all of the selected groupable parts were members of a pre-existing group, the new group also becomes a member of that pre-existing group, if #isValidMember is true for that existing group with the new group. The new group becomes the only selected part. This raises the "SelectionGrouped" diagram event. This method also raises the "ChangingSelection" and "ChangedSelection" diagram events. Changes are performed in a "Group" transaction, but the selection events are raised outside the transaction.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @see #canGroupSelection
Implementation
void groupSelection() {
_i4.callMethod(
this,
'groupSelection',
[],
);
}