Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

WIA.SetDevicePropertyValue

Sets a device property value.

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

MBS( "WIA.SetDevicePropertyValue"; Device; Key; Value { ; Type } )

Parameters

Parameter Description Example value
Device You can pass index of device to check them in a row.
Or pass name or unique ID of device.
Pass empty string for current device.
""
Key The property key. "Horizontal Resolution"
Value The value to use. 300
Type Optional
The data type to use.
By default if empty or auto, we detect it based on the type of the existing property.
Can be Boolean, Int16, Int32, Int64, UInt16, UInt32, UInt64, String or Double.
"Int32"

Result

Returns OK or error.

Description

Sets a device property value.
You can use WIA.DevicePropertyKeys to learn about available keys.

To learn about properties you may need to visit Microsoft websites and figure out the options and the values for the listed constants:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms630196(v=vs.85).aspx

Page sizes are listed here:
https://msdn.microsoft.com/en-us/library/aa360096(v=VS.85).aspx

Examples

Set to scan all pages:

MBS( "WIA.SetDevicePropertyValue"; ""; 3096; 0)

Set media type to file:

MBS( "WIA.SetDevicePropertyValue"; ""; "Media Type"; 2)

Set page size to A4:

MBS( "WIA.SetDevicePropertyValue"; ""; "Page Size"; 0)

See also


WIA.SetCurrentDevice   -   WIA.SetItemPropertyValue

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins