CT Count

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

version 1


CT Count (area; scope) Integer

ParameterTypeDescription
areaLongint4D Chart area
scopeLongint-1 = All
0 = Selected
>0 = Group ID
Function resultIntegerNumber 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

CT Get ID.


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