Barcodes DataMatrix
This will create an instance of DataMatrix barcode.
Syntax
datamatrixBarcode = Barcodes.DataMatrix ( ) |
Properties
Angle | float | Angle at which the barcode is placed along the positive X-axis. This can have +/- values in current angle unit. |
AutoExpand | bool | Gets or sets whether the Data Matrix size will be automatically increased if the current size cannot accommodate all the characters. |
CircleRadius | Double | Gets or sets the radius of the hatching circles when the HatchStyle is set to HatchStyle.Circle. |
DotDuration | float | Gets or Sets the time in micro seconds that the laser should wait to mark a dot when the HatchStyle is set to HatchStyle.Dot |
DotCountPerCell | int | Sets the Number of dots per circle in HatchStyle.CircleWithDot, if selected |
Elevation | float | The z coordinate of the DataMatrix starting position. |
Format | DataMatrixFormat | Format of the DataMatrix. |
HatchStyle | HatchStyle | The hatch pattern used to fill the DataMatrix. |
Height | float | The height of the DataMatrix. |
HatchingAngle | float | Get or sets the hatch line angle for MergeCellsSerpentine and MergeCellsUniDirectional hatch patterns |
Invert | bool | If true, Inverts the DataMatrix. |
LineSpace | float | Gets or sets the hatching line gap of the DataMatrix. |
MarkingOrder | MarkingOrder | Gets or sets the order in which the hatch and the outline will be marked. |
MatrixSize | DatamatrixSize | Gets or sets the size of the datamatrix. |
QuietZone | bool | Gets or sets whether the quite zone of the DataMatrix is enabled or disabled. |
Text | string | Alphanumeric characters, which will get encoded into the DataMatrix. |
X | float | Gets or sets the X coordinate of the starting position. |
Y | float | Gets or sets the Y coordinate of the starting position. |
Methods
SetHatchingDirection(HorizontalHatchDirection hatchDirection, HorizontalHatchLineScanDirection hatchLineScanDirection) | Sets the hatching Direction |
SetHatchingDirection(VerticalHatchDirection hatchDirection , VerticalHatchLineScanDirection hatchLineScanDirection) | Sets the hatching Direction |
Return Values
Returns an instance of DataMatrix type Barcode. |
Copy
Example
----- This program will scan a Datamatrix code applying the dot hatch pattern
-- Set the units as Millimeters
SetUnits(Units.Millimeters)
-- Laser Parameter settings
Laser.JumpSpeed = 2000
Laser.MarkSpeed = 1000
--Delay settings
Laser.JumpDelay = 100
Laser.MarkDelay = 100
-- Assign Datamatrix barcode to variable "var"
var = Barcodes.Datamatrix()
-- Barcode height is 14.5
var.Height = 14.5
-- X coordinate is 0.5
var.X = 0.5
-- Y coordinate is 0.5
var.Y = 0.5
-- Angle of the barcode is 30 degrees
var.Angle = 30
-- Invert the barcode
var.Invert = true
-- Enable quiet zone
var.QuietZone = true
-- Matrix size is 16x16
var.MatrixSize = DataMatrixSize.S16x16
-- Apply Dot hatch pattern
var.HatchStyle = HatchStyle.Dot
-- Sets dot duration as 100
var.DotDuration = 100
-- Barcode includes "ScanMaster" text as the string
var.Text = "ScanMaster"
-- Code format is Industry
var.Format = DataMatrixFormat.Industry
-- Mark DataMatrix code
Image.Barcode(var)