CT Get object type

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

version 1


CT Get object type (area; scope) Integer

ParameterTypeDescription
areaLongint4D Chart area
scopeLongintScope of the function
-1 = All
0 = Selected objects
>0 = Object ID
Function resultIntegerObject type of the objects in area

Description

CT Get object type returns the object type for the object(s) in area described by scope.

An object's type is described by an integer code which cannot be changed once an object is created.

If scope equals -1, CT Get object type returns the object type for all objects in the document. If the types of the objects are not equal, CT Get object type returns -32000.

If scope equals 0, CT Get object type returns the object type for the selected objects. If the types of the objects are not equal, CT Get object type returns -32000.

If scope is greater than 0, it must be equal to a specific object's ID and that object's type is returned. If the object does not exist, CT Get object type returns -32000.

The following table lists all object codes:

CodeObject Type
1Text
2not used
3Picture
4not used
5Chart
6Rectangle
7Polygon
8Oval
9not used
10Line
11Group

Example

This example returns the ID of the selected object in the $ID variable.

   $ID:=CT Get object type (Area;0)

See Also

CT Get ID.


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