DR Count

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 Count (area; scope) Integer

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Group ID
Function resultIntegerNumber of objects in area specified by scope

Description

The command DR Count returns the number of objects in area specified by scope.

If scope equals -1, DR Count returns the number of objects in the document that are not in a group. Groups appear as a single object.

If scope equals 0, DR Count returns the number of objects currently selected that are not in a group. Groups appear as a single object.

If scope is greater than 0, it must be the ID for a group; DR Count returns the number of objects inside the group. This last syntax lets you get information about objects in a group without ungrouping. You can examine nested groups by using subsequent calls to DR Count.

Example

The following example opens an alert that displays the number of currently selected objects.

   $Temp := DR Count (Area;0)
   ALERT ("You have selected " + String ($Temp) + " object(s).")

See Also

DR Get ID.


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