Creates a group from the elements selected in the Diagram Editor control.
// Create a group from the selected elements
IF DiagramGroup(DIAGEDT_MyDiagram) THEN
ToastDisplay("Group created. To undo, press Ctrl+Z.")
END
Syntax
<Result> = DiagramGroup(<Diagram>)
<Result>: Boolean
- True if the group has been created,
- False otherwise. ErrorInfo returns more details about the error.
<Diagram>: Name of the control or Diagram variable
Diagram to be used. This parameter corresponds to: - the name of a Diagram Editor control.
- the name of a variable of type Diagram.
Remarks
- A shape of type "Group" is created and added to the diagram.
- This shape is created from the currently selected elements.
- If the selection contains less than 2 shapes, the function does not create the group and returns False.
- End users can undo the creation of a group if the diagram is in edit mode.