<< Click to Display Table of Contents > 

Client Control Interface Manual > Programming Examples > Create Entity > BarCode

BarCode
Previous pageReturn to chapter overviewNext page

Create barcode entity (ScBarCode12Chars2D)

 

//define the type of the new entity

cci.ScSetStringValue((int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity, "ScBarCode12Chars2D");

 

//specify the exact barcode type

cci.ScSetEntityStringData("ScCreateEntity", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetBarcodeType, "QR Code");

 

//fill the empty entity with content e.g.with "123"

cci.ScChangeTextByName("ScCreateEntity", "123");

 

//define the desired mode of the barcode, if available; if this is not defined,

//the first level will be taken as default.Note, that your barcode might not be valid

//for every content in the default mode and will not be created in this case.

cci.ScSetEntityLongData("ScCreateEntity", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeMode, 2);

 

//define the desired level of the barcode, if avaiable; if this is not defined,

//the first level will be taken as default.Note, that your barcode might not be valid

//for every content with the default level and will not be created in this case.

cci.ScSetEntityLongData("ScCreateEntity", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeLevel, 1);

 

//create the entity of the type defined above, name it "MyEntity", apply pen = 3,

//position its center at(x | y | z) = (0 | 0 | 0) in the coordinate system,

//deactivate the definition of the dimension with dim_x = 0, dim_y = 0

cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 0, 0, 0, "");

Table 398: Create barcode entity (ScBarCode12Chars2D)