Import file with predefined filter
1. impFile fname:="C:\Sample.wav" filtername:="WAV.oif" location:=system;
2. impFile fname="C:\Sample.wav" filtername="C:\Program Files\Origin8\Filters\wav.oif";
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
File Name | fname |
Input string |
|
Specify the filename(s) of the file(s) that will be imported. Click the browse button beside the list box to open one or more files and the filenames will be listed in the box. |
Filter Name | filtername |
Input string |
|
Specify the filename(s) of the filter(s) that will be imported. Click the browse button to select the filter. |
Filter Location | location |
Input int |
|
The location of the filter. This is only available when the filter name does not include full file path. Then the X-Function will find the filter from the selected location of the following list.
|
Output | orng |
Output Range |
|
The range for the imported data See the syntax here. |
This X-Function can be used to import a file with a pre-defined filter. It is not listed in the menu and can only be accessed from script. A filter can be created with Import Wizard or X-Function iwfilter. To import the file correctly, the filter must be a valid one corresponding to the data file.
1. The following example will import a WAV sound file (assume it is C:\WAVData\Sample.wav) with the dialog.
2. The following script will import the WAV file without opening the dialog, which is equivalent to the operation in the example above.
3. The following example will use script to import all SPE files under a specific folder (assume it is C:\SPEData\) with the build-in SPE filter.