Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WIA.Image
Queries native path to image file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WIA | 6.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
Index | The index of the image from 0 to WIA.ImageCount-1. | 0 |
Result
Returns text or error.
Description
Queries native path to image file.This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
Examples
Import Images Script:
Set Variable [ $count; Value:MBS( "WIA.ImageCount") ]
If [ $count > 0 ]
Set Variable [ $i; Value:0 ]
Go to Layout [ “Images” (Images) ]
Loop
Set Variable [ $ImagePath; Value:MBS( "WIA.Image"; $i) ]
If [ MBS( "Files.FileExists"; $ImagePath ) ]
Set Variable [ $image; Value:MBS( "Container.ReadFile"; $ImagePath) ]
New Record/Request
Set Field [ Images::Name; MBS( "Path.LastPathComponent"; $ImagePath ) ]
Set Field [ Images::Image; $image ]
Commit Records/Requests [ No dialog ]
End If
#Next
Set Variable [ $i; Value:$i + 1 ]
Exit Loop If [ $i >= $count ]
End Loop
End If
See also
- Container.ReadFile
- Files.FileExists
- Path.FileMakerPathToNativePath
- Path.LastPathComponent
- WIA.ImageCount
- WIA.ImageDialog
- WIA.Images
- WIA.Scan
Release notes
- Version 10.3
- Changed WIA.ImageDialog and WIA.SelectDeviceDialog to call FM.InitMessageFilter internally to avoid running into COM error dialogs.
- Version 9.1
- Added WIA.Images function.
Example Databases
This function is free to use.
Created 6th November 2016, last changed 25th November 2019