Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Queries an item property value.

Component Version macOS Windows Linux Server iOS SDK
WIA 6.5 ❌ No ✅ Yes ❌ No ❌ No ❌ No
MBS( "WIA.ItemPropertyValue"; Item; Key )   More


Parameter Description Example
Item The item of current device to query.
For a scanner this is typical Flatbed or Feeder.
see WIA.ListItems
Key The property key.
Can be a text with the name of the property or the corresponding ID.


Returns value or error.


Queries an item property value.

File formats UUIDs:

Document Handling Flags:

FEEDER 1Scan by using the document feeder.
FLATBED 2Scan by using the flatbed.
DUPLEX 4Scan by using duplexer operations.
FRONT_FIRST 8Scan the front of the document first. This value is valid only when DUPLEX is set.
BACK_FIRST 16Scan the back of the document first. This value is valid only when DUPLEX is set.
FRONT_ONLY 32Scan the front only.
BACK_ONLY 64Scan the back only. This value is valid only when DUPLEX is set.
NEXT_PAGE 128Scan the next page of the document.
PREFEED 256Enable pre-feed mode. Position the next document while scanning.
AUTO_ADVANCE 512Enable automatic feeding of the next document after a scan.
ADVANCED_DUPLEX 1024Scan 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.


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 ]
    Set Variable [ $count ; Value: ValueCount ( $list ) ]
    If [ $count > 0 ]
        Set Variable [ $i ; Value: 1 ]
            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

Blog Entries

This function checks for a license.

Created 28th November 2016, last changed 18th February 2022

WIA.ItemPropertyKeys - WIA.ListItems