DR GROUP

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR GROUP (area; scope)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected

Description

The command DR GROUP groups the objects in area described by scope.

If scope equals -1, DR GROUP groups all objects in the document.

If scope equals 0, DR GROUP groups the selected objects. When objects are grouped, a new object of type Group is created.

After a call to DR GROUP, the command automatically selects the new object; you can use the DR Get ID function to obtain its ID. If less than two objects are described by scope, DR GROUP does nothing.

Example

The following example checks to see if more than one object is selected and, if so, asks the user to supply a name. It then groups the selected objects and gives the new group the user supplied name.

   If (DR Count (Area;0) > 1)
      $Temp := Request ("Please name this new group.")
      If (OK = 1)
         DR GROUP (Area;0)
         DR SET NAME (Area;0;$Temp)
      End if 
   Else 
      ALERT ("Not enough objects selected.")
   End if

See Also

DR Get ID, DR UNGROUP.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next