Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

WIA.ItemPropertyValue

Queries an item property value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WIA 6.5 No Yes No No No

MBS( "WIA.ItemPropertyValue"; Item; Key )

Parameters

Parameter Description Example value
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.

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")

See also

Created 28th November 2016, last changed 15th February 2018


WIA.ItemPropertyKeys   -   WIA.ListItems

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos