Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WIA.ItemPropertyValue
Queries an item property value.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WIA | 6.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
Item | The item of current device to query. For a scanner this is typical Flatbed or Feeder. see WIA.ListItems |
"Flatbed" |
Key | The property key. Can be a text with the name of the property or the corresponding ID. |
"Name" |
Result
Returns value or error.
Description
Queries an item property value.File formats UUIDs:
BMP | B96B3CAB-0728-11D3-9D7B0000F81EF32E |
JPEG | B96B3CAE-0728-11D3-9D7B0000F81EF32E |
PNG | B96B3CAF-0728-11D3-9D7B0000F81EF32E |
GIF | B96B3CB0-0728-11D3-9D7B0000F81EF32E |
TIFF | B96B3CB1-0728-11D3-9D7B0000F81EF32E |
Document Handling Flags:
Name | Value | Description |
FEEDER 1 | Scan by using the document feeder. | |
FLATBED 2 | Scan by using the flatbed. | |
DUPLEX 4 | Scan by using duplexer operations. | |
FRONT_FIRST 8 | Scan the front of the document first. This value is valid only when DUPLEX is set. | |
BACK_FIRST 16 | Scan the back of the document first. This value is valid only when DUPLEX is set. | |
FRONT_ONLY 32 | Scan the front only. | |
BACK_ONLY 64 | Scan the back only. This value is valid only when DUPLEX is set. | |
NEXT_PAGE 128 | Scan the next page of the document. | |
PREFEED 256 | Enable pre-feed mode. Position the next document while scanning. | |
AUTO_ADVANCE 512 | Enable automatic feeding of the next document after a scan. | |
ADVANCED_DUPLEX 1024 | Scan by using individual configuration settings for each child feeder item (WIA_CATEGORY_FEEDER_FRONT and WIA_CATEGORY_FEEDER_BACK). This flag cannot be set together with DUPLEX. A device that supports different scan settings for the front and back items should implement the optional ADF front and back items and it should support both DUPLEX and ADVANCED_DUPLEX. |
Use WIA.ItemProperties to query all values with keys as JSON.
Use WIA.SetItemPropertyValue to set a value.
Examples
Queries resolution:
MBS( "WIA.ItemPropertyValue"; "Flatbed"; "Horizontal Resolution" )
Queries file extension:
MBS( "WIA.ItemPropertyValue"; "Flatbed"; "Filename extension" )
Queries media type:
MBS( "WIA.ItemPropertyValue"; "Flatbed"; "Media Type" )
Queries orientation:
MBS( "WIA.ItemPropertyValue"; "Flatbed"; "Orientation" )
// 0 = Portrait, 1 = Landscape, 2 = Rotate 180, 3 = Rotate 270
List properties of feeder:
Set Variable [ $item ; Value: "Feeder" ]
Set Variable [ $list ; Value: MBS("WIA.ItemPropertyKeys"; $item) ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Error" ; $list ]
Else
Set Variable [ $count ; Value: ValueCount ( $list ) ]
If [ $count > 0 ]
Set Variable [ $i ; Value: 1 ]
Loop
Set Variable [ $key ; Value: GetValue ( $list; $i) ]
Set Variable [ $value ; Value: MBS("WIA.ItemPropertyValue"; $item; $key) ]
New Record/Request
Set Field [ WIA Scan::Device ; $item ]
Set Field [ WIA Scan::Key ; $key ]
Set Field [ WIA Scan::Value ; $value ]
Commit Records/Requests [ With dialog: Off ]
# Next
Set Variable [ $i ; Value: $i+1 ]
Exit Loop If [ $i > $count ]
End Loop
End If
End If
Query document handling select:
MBS( "WIA.ItemPropertyValue"; "feeder"; "Document Handling Select")
Query format:
Set Variable [ $format; Value: MBS( "WIA.ItemPropertyValue"; "Flatbed"; "Format") ]
Example result: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E}
See also
- IsError
- WIA.DevicePropertyValue
- WIA.ItemProperties
- WIA.ItemPropertyKeys
- WIA.ListItems
- WIA.SetItemPropertyValue
Blog Entries
This function checks for a license.
Created 28th November 2016, last changed 18th February 2022