Loads the filter settings.
[Visual Basic] Function LoadSettings( _ ByVal p_sFilterSettings As String, _ ByVal p_bIgnoreErrors As Boolean _ ) As Boolean [C#] bool LoadSettings( string p_sFilterSettings, bool p_bIgnoreErrors ); [C++] bool LoadSettings( String* p_sFilterSettings, bool p_bIgnoreErrors ); [JScript] function LoadSettings( String p_sFilterSettings, bool p_bIgnoreErrors ): bool;
True if the settings could be loaded (or set to their defaults values), false if an error occured.
The filter settings string has the following syntax:
[<folder>]<filterID>[#<variantID>][@[<F>%]<parametersID>]
Where:
<folder>
is the optional folder where the parameters file is located. This folder must not be specified if the <F>
component of the parameters file identifier is set. If <folder>
and <F>
are both omitted the default Okapi Parameters folder is assumed. Note that the folder portion of the filter settings string is not relevant if there is no <parametersID>
since there is no physical file for the default settings.<filterID>
is the filter identifier (the value returned by the GetIdentifier method).<variantID>
is an optional variant identifier for the given filter (one of the values returned by the GetVariantID method).[<F>]<parametersID>
is the optional identifier of a parameters file. The optional <F>
component is the folder identifier: S for the sytem folder, U for the user folder, and P for the project folder. If no folder identifier is specified the system folder is assumed. The system folder is the sub-folder named Parameters
in the Okapi Shared folder, so by default in Windows: C:\Program Files\Okapi\Shared\Parameters
.
The user folder is the sub-folder named Okapi\Parameters
in the Application data folder, so by default in Windows: C:\Documents and Settings\USERNAME\Application Data\Okapi\Parameters
.
The project folder is the folder specified by the environment variable OKAPIPROJECTPARAMETERS
. Each application is responsible for setting the variable. If the variable is not set or empty, the project folder is assumed to be the current folder of the running application.
Loads the Okapi PO Filter with the parameters file named okf_po@myOptions.fprm
located in the default Okapi Parameters folder. An error is generated if the file does not exist.
LoadSettings("okf_po@myOptions", true);The actual file loaded will be
C:\Program Files\Okapi\Shared\Parameters\okf_po@myOptions.fprm
assuming the application is installed with its default parameters file location. The parameter could also have been okf_po@S%myOptions.fprm
. IFilter Interface | Okapi.Library.Filter Namespace