Barcode1DReaderDoScan Argument not Optional

Discussions about 1D barcode reading and writing
Post Reply
Sbrunner
Posts: 3
Joined: Thu Jun 10, 2010 2:00 am

Barcode1DReaderDoScan Argument not Optional

Post by Sbrunner » Thu Jun 10, 2010 6:09 pm

I took the "OCR" ActiveX Example to modify it to do the barcode. This is the code I added

Code: Select all

  Imaging1.SetNativeImage (GdViewer1.GetNativeImage)
Imaging1.SetLicenseNumber1DBarcodeRecognition ("XXX") 'Replace XXX by a commercial or a demo key
Imaging1It.Barcode1DReaderDoScan
For i = 1 To Imaging1.Barcode1DReaderGetBarcodeCount
   MsgBox "Value: " + Imaging1.Barcode1DReaderGetBarcodeValue(i)
   MsgBox "Type: " + Str(Imaging1.Barcode1DReaderGetBarcodeType(i))
   MsgBox "Angle: " + Str(Imaging1.Barcode1DReaderGetBarcodeSkewAngle(i))
Next i
Imaging1.Barcode1DReaderClear
This code replaced the code in "Command4_Click"
When I try to run it, the error I get is "Argument not Optional" And it is highlighting "Barcode1DReaderDoScan"
Any help would be greatly appreciated.

User avatar
Loïc
Site Admin
Posts: 5594
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Barcode1DReaderDoScan Argument not Optional

Post by Loïc » Fri Jun 11, 2010 2:12 pm

Hi,

As the error message said you omit to mention a parameter.

Just replace

Code: Select all

Imaging1It.Barcode1DReaderDoScan
by

Code: Select all

Imaging1.Barcode1DReaderDoScan (BestQuality) 'Or BestSpeed

Kind regards,

Loïc

Sbrunner
Posts: 3
Joined: Thu Jun 10, 2010 2:00 am

Re: Barcode1DReaderDoScan Argument not Optional

Post by Sbrunner » Fri Jun 11, 2010 4:34 pm

I have done that, and now the compile error is "Ambiguous name detected: BestQuality"

Thanks,
~Justin

Sbrunner
Posts: 3
Joined: Thu Jun 10, 2010 2:00 am

Re: Barcode1DReaderDoScan Argument not Optional

Post by Sbrunner » Wed Jun 16, 2010 7:24 pm

Still havent found a solution.

User avatar
Loïc
Site Admin
Posts: 5594
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Barcode1DReaderDoScan Argument not Optional

Post by Loïc » Thu Jun 17, 2010 1:21 pm

Hi,

Sorry for the delay. Well you can do that;

Code: Select all

call Imaging1.Barcode1DReaderDoScan (1) 'for best quality
or

Code: Select all

call Imaging1.Barcode1DReaderDoScan (1) 'for best speed
Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest