CT Get ID

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

version 1


CT Get ID (area; scope; index) Longint

ParameterTypeDescription
areaLongint4D Chart area
scopeLongintScope of the function
-1 = All
0 = Selected objects
>0 = Group ID
indexLongintNumber of object in scope
Function resultLongintThe object's unique Object ID

Description

CT Get ID returns the unique ID for the object in area described by scope and index. This number is used by many other 4D Chart commands and is referred to as an object's ID.

To get an object's ID, you first specify which set of objects to refer to and then the order of the object within the set. Objects are ordered from back to front. The backmost object has an index of 1.

If scope equals -1, then index refers to the order of the object within the entire document.

If scope equals 0, then index refers to the order of the object within the currently selected objects.

If scope is greater than 0, it must be the ID for a group and index refers to the order of objects within the group. This last syntax lets you manipulate objects in a group without ungrouping.

Example

This example shows how to extract the ID for a selected object.

   vID := CT Get ID (Area;0;1)    `Get the ID of the first selected object

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