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.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

WIA.SetItemPropertyValue

Sets a property of an item.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WIA 6.5 No Yes No No No
MBS( "WIA.SetItemPropertyValue"; Item; Key; Value )   More

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"
Value The new value for this property.

Result

Returns OK or error.

Description

Sets a property of an item.

Examples

Set resolution:

MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Horizontal Resolution"; 300 ) &
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Vertical Resolution"; 300 )

Set rotation:

MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Rotation"; 2 )
// 0 = Portrait, 1 = Landscape, 2 = Rotate 180, 3 = Rotate 270

Set gray or color:

MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Current Intent"; 2)
// 1 = color
// 2 = gray

Set duplex:

Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 4 )
/*
1 = feeder
2 = flatbed
4 = duplex
8 = front first
16 = back first
32 = front only
64 = back only
128 = next page
256 = preferred
512 = auto advance

see
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-dps-document-handling-select

*/ ]
Show Custom Dialog [ "Set duplex" ; $r ]

Set to ignore blank pages:

Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Blank Pages"; 1 )
/*
0 = Blank page detection is disabled. This is the required default value if the property is supported.
1 = The device detects blank pages and automatically skips scanning them (discards scanned data if any) and continues scanning.
2 = The device detects blank pages and acts as configured through the Job Separators property. This value is valid only when the Feeder item supports the Job Separators property.

see
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-ips-blank-pages

*/ ]
Show Custom Dialog [ "Set blank pages" ; $r ]

Set to scan only front page:

Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 32 )

See also

Example Databases

Blog Entries

Created 28th November 2016, last changed 11st June 2018


WIA.SetDevicePropertyValue   -   WMIQuery.Connect

Feedback: Report problem or ask question.




Links
MBS FileMaker blog