<< Click to Display Table of Contents > 

Client Control Interface Manual > Job > Entity Objects

Entity Objects
Previous pageReturn to chapter overviewNext page

Connect Serial Numbers

Create Entity

Delete Entity

Duplicate Entity

Entity Type

 

Connect Serial Numbers
 

Set

Get

DLL Function

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

ASCII Function

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

Description

This command is developed for "connected" serial number/ barcode and Text2D (share the same name in EntityInfo) -- when the text is changed, the barcode would be changed in the same way. This command has the same functionality as the button apply in the barcode page after changing the text in SAMLight.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntityGenerate

125

Flag

Type: int

Unit: none

Flag = 1 is required for this command.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Connect serial numbers:
 
int CCI_Return = cci.ScSetEntityLongData("Entity1",(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGenerat, 1);

Table 119: Connect Serial Numbers

Create Entity
 

Set

Get

DLL Function

int CCI_Return = ScCreateEntity(string Entity_Name, string Father_Entity, int Pen, double Center_X, double Center_Y, double Center_Z, double Dim_X, double Dim_Y, int Flag, string Option)

ASCII Function

int CCI Return = ScCciCreateEntity(string Entity_Name, string Father_Entity, int Pen, double Center_X, double Center_Y, double Center_Z, double Dim_X, double Dim_Y, int Flag, string Option)

Description

Entities of the type ScBarCode12Chars2D, ScWinTextChars2D, ScSerialNumber, ScEllipse2D, ScRectangle2D, ScPolyLine2D and ScSpiral2D can be created by using this CCI command.

Entity_Name

Type: string

Unit: none

Specify the name of the entity as it should appear in the entity list with Entity_Name.

Father_Entity

Type: string

Unit: none

Specify the Group name.

If father is the empty string "", the new entity will be put at the end of the entity list.

If father is not empty, but the name of any "ScEntities2D" entity in the entity list (created by grouping of an entity), the new entity will be created inside this ScEntities2D father entity at the end of all existing entities.

If there are several entities with identical name, the first one will be taken as father entity.

If the father string does not exist in the entity list, no entity will be created and the function returns 0.

Pen

Type: int

Unit: none

The pen number, which should be applied to the new entity.

Center_X

Type: double

Unit: [mm]*

The desired center coordinates (X).

Center_Y

Type: double

Unit: [mm]*

The desired center coordinates (Y).

Center_Z

Type: double

Unit: [mm]*

The desired center coordinates (Z).

Dim_X

Type: double

Unit: none

The desired X dimensions.

Dim_Y

Type: double

Unit: none

The desired Y dimensions.

Flag

Type: int

Unit: none

Has to be 0.

Option

Type: string

Unit: none

Has to be empty: "".

CCI_Return

Type: int

CCI return number, see error list.

Notes

The type of entity has to be specified before with Set Entity Type.

As first the type of the desired entity have to be defined with CreateEntity command.

Then set the content of the entity and finally create the entity with ScCreateEntity.

The default unit is mm, but the user can select a different unit.

In case of ScPolyLine2D use double.Positive Infinity as parameter for one of Center_X/Y/Z to disable centering.

C# Example: There are several ScCreateEntity examples.

Table 120: Create Entity

Delete Entity
 

Set

Get

DLL Function

int CCI_Return = ScDeleteEntity(string Entity_Name)

ASCII Function

int CCI_Return = ScCciDeleteEntity(string Entity_Name)

Description

Deletes the entity with the name Entity_Name.

Entity_Name

Type: string

Unit: none

The name of the entity to be deleted.

CCI _Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Delete entity1:

 

string Entity_Name = "Entity1";

int CCI_Return = cci.ScDeleteEntity(Entity_Name);

Table 121: Delete Entity

Duplicate Entity
 

Set

Get

DLL Function

int CCI_Return = ScDuplicateEntity(string Entity_Name, string Duplicated_Name)

ASCII Function

int CCI_Return = ScCciDuplicateEntity(string Entity_Name)

Description

Duplicates the entity with the name Entity_Name.

Entity_Name

Type: string

Unit: none

The name of the entity to be duplicated.

Duplicated_name

Type: string

Unit: none

The name of the duplicated entity.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Duplicate entity1:

 

string Entity_Name = "Entity1";

string Duplicated_Name = "Entity2";

int CCI_Return = cci.ScDuplicateEntity(Entity_Name, Duplicated_Name);

Table 122: Duplicate Entity

Entity Type
 

Set

Get

DLL Function

int CCI_Return = ScSetStringValue(int Value_Type, string Entity_Type)

ASCII Function

int CCI_Return = ScCciSetStringValue(int Value_Type, string Entity_Type)

Description

Specify the type of the entity to be created. For further information on the creation of an entity, see ScCreateEntity.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlStringValueTypeCreateEntity

36

Entity_Type

Type: string

Unit: none

Can take following values:

ScBarCode12Chars2D

ScWinTextChars2D

ScSerialNumber

ScEllipse2D

ScRectangle2D

ScPolyline2D

ScSpiral2D

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: for usage examples, please refer to Programming Examples: Create Entity chapter.

Table 123: Entity Type