Forums › TWAIN Classic › Command line twain › Reply To: Command line twain
ah, I see. When you downloaded the opentwain library you were on the ‘releases’ tab just to the right there is a tab named ‘Discussions’ and I wrote a couple 3 things there – the problem you’ve come across is that the device you’re using doesn’t support a required capability – EnableDsUiOnly. What a drag. This means you are basically left with the tiresome task of setting eihher using the Ui everytime you scan or attempting to manage all of the capabilities of the scanner.
Is your project for pleasure or business? I ask becasue if this is to be used in production I would advide against using the device you’re trying to use unless you’re sure the device you have is the device the client is going to use and that they aren’t going to use pretty much anything but that one model or possibly devices from the same vendor. But if this is a smaller project and yoy’re just looking to control a device that you own you should be ok.
Back to the problem at hand. You won’t be able to take a profile based approach and you’ll have to manipulate each cap one by one. In the guiSample I manipulate a couple of caps with the openTwain lib that way – look in twain.vb near the top in the region named ‘ Capability Methods ‘ i get a couple of cap values and I set a couple of others. you should be able to follow that model to get or set most of the rest of them. If there are caps you can’t set using that model let me know. In the background, I have begun the tedious task of making each of the caps accessible as properties but it is tiresome work and it’s going to be done for maybe a couple a weeks .
g