Class Reference barcodeModule

A Module to generate different kinds of barcodes. More...

Member

void addBarcode(string text)
string data
void placeBarcode(point p1,point p2)
double ratio
void setCode128()
void setCode128A()
void setCode128B()
void setCode128C()
void setCode39()
void setCode39Mod43()
void setDatamatrix()
void setMicroQrCode()
void setQrCode()

Detailed Description

graph LR la(layout)--barcodeTool-->br(barcodeModule) click la "/layoutscript/api/layout" click ne "/layoutscript/api/netlistmodule" click bo "/layoutscript/api/booleanhandler" click br "/layoutscript/api/barcodemodule" click ba "/layoutscript/api/backgroundmodule" click drc "/layoutscript/api/drc" click dr "/layoutscript/api/drawingfield" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class br thisClas class cl,la,dr,el,ne,bo,ba,drc clas

With this class barcode can be generated and be added to the current displayed cell. A typical macro call will look like:

layout->barcodeTool->setCode128();
layout->drawing->point(1400,-800);
layout->drawing->point(8800,-3300);
layout->barcodeTool->addBarcode("LayoutEditor");

And result in this barcode:

In the first code line the required barcode type is set, then the location is entered and finaly the contents of the bar code is set. The barcode will be added to the active layer. Please note that not all barcodes support all characters. Non supported characters will be ignored.

Member Function Documentation


void barcodeModule::addBarcode(string text)

Add a barcode to the current cell. The given text will be used as the data of the code. The location of the barcode had to be enter prior via the point comannd.


string barcodeModule::data

Data which will be decoded to a barcode.


void barcodeModule::placeBarcode(point p1,point p2)

Place a barcode in a rect p1-p2. The data had to be set prior via the data property.


double barcodeModule::ratio

Same barcode type allow a variable ratio between small and wide bar. This value can be setup via this property. It had to be set after setting the barcode type. Any barcode type change will reset this value to a default value.


void barcodeModule::setCode128()

Sets the barcode encoding to code 128. This is an group of 3 code (code 128A, code128B and code 128C). The best matching code is used.


void barcodeModule::setCode128A()

Sets the barcode encoding to code 128A. Code 128A barcodes support capital letter, digits and most special char including newline and return.


void barcodeModule::setCode128B()

Sets the barcode encoding to code 128B. Code 128B barcodes support all letter, digits and some special char excluding newline and return.


void barcodeModule::setCode128C()

Sets the barcode encoding to code 128C. Code 128C supports digits only.


void barcodeModule::setCode39()

Sets the barcode encoding to code 39. The Code 39 supports capital letters, digits and some special chars. Over all 42 different characters. Each caracter is encoded in 9 bar/space with 3 bar wider than the others.


void barcodeModule::setCode39Mod43()

Sets the barcode encoding to code 39 mod 43. This code is mostly identical with code 39, but has an additionally checksum byte at its end.


void barcodeModule::setDatamatrix()

Sets the barcode encoding to datamatrix (ISO16022). The entered text will be ASCII encoded to the datamatrix.

These special phrases are available:

entered text Codeword Meaning
<FNC1> 232 Function 1 Symbol Character (FNC1)
<GS> 29 Field/Group Separator

Intended use of these special phrases is to enter GS1 DataMatrix ECC200 code, which is an open system for automatic identification. (e.g. 17091125 marks an expiration date of 25th Nov. 2009, or 21AB12345 marks a serial number of AB12345).

Datametrix Example:

datamatrix


void barcodeModule::setMicroQrCode()

Sets the barcode encoding to mirco QR-code. The entered text will be stored as 8 bit unicode data. The maximum length is 15 character.

Micro-QR Example:

micro-qr


void barcodeModule::setQrCode()

Sets the barcode encoding to QR-code (ISO18004). The entered text will be stored as 8 bit unicode data.

QR Example:

qr-core