version 6.0
DR Count (area; scope) Integer
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1=All | |
| 0=Selected | |||
| >0=Group ID | |||
| Function result | Integer | Number 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