version 1
CT Count (area; scope) Integer
Parameter | Type | Description | |
area | Longint | 4D Chart area | |
scope | Longint | -1 = All | |
0 = Selected | |||
>0 = Group ID | |||
Function result | Integer | Number of objects in the area |
Description
CT Count returns the number of objects in the area described by scope.
If scope equals -1, CT 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, CT Count returns the number of 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 and CT Count returns the number of objects inside the group. With this syntax you can get information about objects in a group without ungrouping. You can examine nested groups by using subsequent calls to CT Count.
Example
This example opens an alert box that displays the number of currently selected objects.
$Count := CT Count (Area;0) ALERT ("You have selected " + String ($Count) + " object(s).")
See Also