Switch driver options INI files when using different check scanner models?

Started by bclark, October 27, 2020, 11:11:32 AM

Previous topic - Next topic

bclark

Question: Can I switch Ranger driver options files based on the scanner model?  I would like to use one file when connected to a Digital Check TS 230 or TS 240 scanner, and a different driver options file when connected to a TS 4120.

Answer:
"Ranger for Digital Check TS-series" supports the following check scanner models:
TS200, TS210, TS215, TS220, TS230, TS240, TS300, TS350, TS400, TS500, TS4120, CX30, and BX7200

You can tell Ranger to switch driver options file by calling:

Ranger.SetDriverOptionsFileName(file path)


With this in mind, I would take the following approach:

1. Save a copy of the "DigitalCheck-TSSeries.ini" file, that you would like to use with TS 230/240 scanners, and rename it to something like "DriverOptions_TS230_TS240.ini". Then copy the new INI file to one of your application folders.

2. On Windows 10 and later, the default location of is:
C:\ProgramData\Silver Bullet Technology\Ranger\Scanner Plug-ins\DigitalCheck-TSSeries\DigitalCheck-TSSeries.ini

3. Repeat this step for the TS 4120.  Make another copy of "DigitalCheck-TSSeries.ini" and rename it to something like "DriverOptions_TS4120.ini". Then copy the new INI file to one of your application folders.

4. After calling Ranger.Startup(), and after Ranger reaches the "ChangeOptions" state then...

5. In your application code, obtain the scanner model by calling:

ModelName = Ranger.GetTransportInfo("General", "Model")


6. Then tell Ranger which driver options INI file you would like to use, based on the model name, by calling:

Ranger.SetGenericOptionsFileName(ini file path)


Pleas note: Ranger only reads from its INI files when you call:

Ranger.EnableOptions()


When multiple check scanning applications are installed on the same workstation, and they both write to the same default Ranger INI files, you can never be sure which options the other application set.

Because of this possibility, it is best to make and use a private copy of Ranger's default INI files.  Use the following calls to point Ranger to your private files:

Ranger.SetGenericOptionsFileName(file path)
Ranger.SetDriverOptionsFileName(file path)


Good luck, and happy scanning!
Bryan Clark



Ranger® - The universal check scanner interface
Copyright © 2020 Silver Bullet Technology
https://sbullet.com