<< Click to Display Table of Contents > 

Client Control Interface Manual > Job > Entities Properties

Entities Properties
Previous pageReturn to chapter overviewNext page

Count Entities

Entity Placement

Entity User Data

Point Coordinate

 

Count Entities
 

Set

☒  Get

DLL Function

int Entity_Num = ScGetLongValue(int Value_Type)

ASCII Function

int Entity_Num = ScCciGetLongValue(int Value_Type)

Description

Get the total number of entities.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeTotalEntityNum

10

By using this type parameter it is possible to count the total number of available entities including the ones that are nested in groups.

scComSAMLightClientCtrlLongValueTypeToplevelEntityNum

11

This parameter can be used to evaluate the top level entities. Using this value the number of entities is returned which is visible on the highest level, excluding the contents of groups.

Entity_Num

Type: int

Unit: none

Returns the number of entities

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Count all the top level entities

 

int Entity_Num = cci.ScGetLongValue((int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeTopLevelEntityNum);

Table 180: Count Entities

Entity Placement
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)

int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)

int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Make an entity to hidden entity or move it to background.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntitySetAsBackgroundEntity

78

Set the entity specified by Entity_Name to the background or foreground. To set it to the background use 1 as parameter. To set it into the foreground use 0 as parameter. The entity gets also set nonmarkable and noneditable.

scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity

112

Hides or shows the entity in View2D specified by the Entity_Name. To hide it in View2D use 1 as parameter. To show it in View2D use 0 as parameter.

scComSAMLightClientCtrlLongDataIdEntityRedpointer

131

Set the entity to a redpointer entity.

scComSAMLightClientCtrlLongDataIdEntityNonMarkableEntity

140

Set the entity nonmarkable.

scComSAMLightClientCtrlLongDataIdEntityNonEditableEntity

141

Set the entity noneditable.

scComSAMLightClientCtrlLongDataIdEntityNonSplittablePre

142

Set the entity nonsplittable - pre mark.

scComSAMLightClientCtrlLongDataIdEntityNonSplittablePost

143

Set the entity nonsplittable - post mark.

Parameter

Type: int

Unit: none

0: Disable.

1: Enable.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Hide the entity "circle1" and move it to the background:

 

int CCI_Return_01 = cci.ScSetEntityLongData("circle1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity, 1);

int CCI_Return_02 = cci.ScSetEntityLongData("circle1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsBackgroundEntity, 1);

C# Example: Check, if the "circle1" entity is a hidden entity:
 
int Is_Not_Hidden = cci.ScGetEntityLongData("circle1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity);

Table 181: Entity Placement

Entity User Data
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int User_Data)

int User_Data = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int User_Data)

int User_Data = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Set or get some arbitrary long value inside the entity.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdUserData

1

User_Data

Type: int

Unit: none

Your data.

CCI_Return

Type: int

CCI return number, see error list.

Notes

The data you store with this command will not be visible inside the SAMLight application and can be called using the ScGetEntityLongData command.

C# Example: Store some random numbers inside the entity "Entity1":

 

int CCI_Return = cci.ScSetEntityLongData("Entity1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdUserData, 123456);

C# Example: Read the entity specific long user data of the entity "Entity1":
 
int User_Data = cci.ScGetEntityLongData("Entity1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdUserData);

Table 182: Entity User Data

Point Coordinate
 

Set

Get

DLL Function

double Coordinate = ScGetDoubleValue(int Value_Type)

ASCII Function

double Coordinate = ScGetDoubleValue(int Value_Type)

Description

Returns the x, y and z coordinate of a point which is selected in SAMLight.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlDoubleValueTypeSelPointXPos

86

The X position.

scComSAMLightClientCtrlDoubleValueTypeSelPointYPos

87

The Y position.

scComSAMLightClientCtrlDoubleValueTypeSelPointZPos

88

The Z position.

Coordinate

Type: double

Unit: none

Get the current position.

CCI_Return

Type: int

CCI return number, see error list.

Notes

If no point is selected the return value is '0'.

If more than one point is selected, the command returns the coordinate of the first selected point.

C# Example: Get the x coordinate:

 

double x_Pos = cci.ScGetDoubleValue((int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSelPointXPos);

Table 183: Point Coordinate