4D Chart v13

CT Get object type

Home

 
4D Chart v13
CT Get object type

CT Get object type 


 

CT Get object type ( area ; scope ) -> Function result 
Parameter Type   Description
area  Longint in 4D Chart area
scope  Longint in Scope of the function -1 = All 0 = Selected objects >0 = Object ID
Function result  Integer in Object type of the objects in area

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)

 
PROPERTIES 

Product: 4D Chart
Theme: CT Objects
Number: 14564

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT Get ID