Code 3 of 9 Barcode creation class?

Hi Folks,

This was bantered around on the NUG last year and ended up with links to Jeri Hall’s “7 of 9” Star Trek Borg character.

Does anyone know of a RS / Xojo class for generating Code 3 of 9 barcodes?

I think I should finally spend the weekend on finishing the barcode plugin…

:slight_smile:

check out http://www.java4less.com/barcodesrealbasic/barcodesrealstudio.php?info=userguide

You can download one from here:

http://a84ada56209336abfe77-c4948c032f11ffe66a5610fc54ce5964.r20.cf2.rackcdn.com/Classes/Code39.rbo.zip

That’s something I created years ago for my business.

Thanks, Greg - exactly what I needed.

@Greg O’Lone - I get an error in the Generate method:

    x = x + iif(ShowText,4,1)

Says iif does not exist. Ideas?

It’s that missing function from Xojo.

Function iif(test As Boolean, TruePart As Variant, FalsePart As Variant) As Variant
If test Return TruePart
Return FalsePart
End Function

Thanks Wayne - This is a bit of convoluted logic that seems to be the same as C ? : ternary function. However, I’ll need to pound on Greg for more details since the pictures being created are huge - even using his default notes example settings.

The images are probably drawn at 300dpi. I’m not near my computer this weekend, so I can’t be sure, but there’s probably a dpi setting in there somewhere.

Look into DutchTools Free :slight_smile: I think you’ll find what you need : http://forums.realsoftware.com/viewtopic.php?f=1&t=36396&hilit=dutchtools+free

When the ShowText option is true then height and width are scaled up by 4, you can see that at the top of Generate(). There’s also some options that aren’t used like extended ascii and checksum, MaxWidth causes incorrect bar gaps and the picture width isn’t tight against the edge of the last bar.

This is Gregs code stripped down and refactored for those items. I don’t have a reader to test with so ymmv. but it was fun to reverse engineer his loops :stuck_out_tongue_winking_eye:

http://home.comcast.net/~trochoid/code/code392.zip

The plugin is done soon. I’m uploading my barcode plugin now with 13.4pr5 plugins.

Keep in mind that while Will had issue with my code, mine is in use by a mail forwarding company with both laser and LED readers and they’ve never had problems for nearly 8 years.

The reason for the 4x multipliers is so that text will render crisply. Just draw the picture into your graphics object like this:

p = bc.generate g.drawpicture 0,0,bc.width,bc.height,0,0,p.width,p.height

that way you’ll get nice crisp text.

The only real problem is in this line, the result of iif should be multiplied by m.
x = x + iif(ShowText,4,1)
m is usually 1 but if MaxWidth is used then m may be something else and the char gap isn’t thick enough.

The other changes are simply just cosmetic (no right side overflow) and efficiency (less string processing).

[quote=45175:@Greg O’Lone]Keep in mind that while Will had issue with my code, mine is in use by a mail forwarding company with both laser and LED readers and they’ve never had problems for nearly 8 years.
[/quote]
And its free :stuck_out_tongue:

I just bought from them. Hope it works better than their online purchase. They advertise $126.00 for the distribution license and the price actually charged is $135.77. Sloppy :frowning:

Probably caused by changed exchange rates euro → dollar.

No. The price in Euro is advertised at € 90.00 and the actual charge in euro is € 97.62.

Sloppy. Sloppy. Sloppy.

That’s indeed a very strange difference, it’s also a strange selling price. Their whole website looks very old. It is time for a complete overhaul.