Jump to content

DataMatrix Barcode


Recommended Posts

i found it:

 

return MakeDataMatrixBarcode (Field("CNTL"), true, "TEXT", "UIC", "4", "NoFontTag", "IDAutomationDMatrix");

 

does anybody know what "UIC" means?

my problem is the barcode shows up as 16 squares but i need 4 squares. i wonder if it is done with the preferred format.

Link to comment
Share on other sites

i found it:

 

return MakeDataMatrixBarcode (Field("CNTL"), true, "TEXT", "UIC", "4", "NoFontTag", "IDAutomationDMatrix");

 

does anybody know what "UIC" means?

I don't think that's valid. It's probably a mistake in the example.

 

The prototype of the function, from the Building Blocks dialog (Functions tab, Barcode node), as well as in the FusionPro Rules Guide documentation, is:

MakeDataMatrixBarcode(DataToEncode, ProcessTilde, EncodingMode,
            PreferredFormat, PointSize, NoFontTag, Font)

So the fourth parameter is the Preferred Format, which is an integer, from this table:

http://www.idautomation.com/datamatrixfaq.html#DataMatrix_Formats

 

Also, if you look in the Building Blocks dialog, under the Objects tab, and expand the Barcodes node, then DataMatrixBarcode, and the preferredFormat property, it shows this description:

An integer specifying the preferred format for the barcode; valid values are from 0 (10X10) to 23 (144X144) and from 24 (8X18) to 29 (16X48). Defaults to 0 (automatic).
But note that that's just the preferred format, i.e. the minimum matrix (pixel) size. The barcode may be produced in a larger matrix size depending on the amount of data encoded. So I would just leave that at zero, which is the default anyway. And I'd probably leave most of the others at their default values too, unless you have a specific reason to change them.

 

So a valid call to the function would look more like this:

 return MakeDataMatrixBarcode(Field("CNTL"), false, "ASCII", 0, 10);

Although I think it's more obvious to see what the parameters are doing by using the DataMatrixBarcode object and its more explicit named properties, like so:

var DM = new DataMatrixBarcode;
DM.processTilde = false;
DM.encodingMode = "ASCII";
DM.preferredFormat = 0;
DM.pointSize = 10;
return DM.Make(Field("CNTL"));

Although even in that last example, all the values are set to their defaults, so you could remove all but the first and last line.

my problem is the barcode shows up as 16 squares but i need 4 squares. i wonder if it is done with the preferred format.

I'm not sure what you mean by "4 squares." The smallest format is Format 0, which produces a 10x10 matrix.

Link to comment
Share on other sites

ah. got it to work. here is what i did:

 

var DM = new DataMatrixBarcode;

DM.processTilde = false;

DM.encodingMode = "ASCII";

DM.preferredFormat = 10;

DM.pointSize = 6;

return DM.Make(Field("Ticket ID"));

 

I just had to change the preferredFormat.

 

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...