Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

OCR.IsInitialized

Checks if OCR library has been initialized.

Component Version macOS Windows Linux Server iOS SDK
OCR 4.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "OCR.IsInitialized" )

Parameters

none

Result

Returns 1 or 0.

Description

Checks if OCR library has been initialized.
If value is 1, everything is okay.
If value is zero, the library is not initialized and you need to call OCR.Initialize function.
On a hosted database this function is better than using a global variable, as the variable can't see if initialization was made on server or client side.

Starting with version 11.2 of MBS Plugin, the initialization is per thread. Scripts running on FileMaker server may need to check OCR.IsInitialized and do initialization for their execution thread if needed before using OCR functions. But then each script can do OCR in parallel using multiple CPU cores.

Examples

Initialize on demand:

If [MBS("OCR.IsInitialized") ≠ 1]
    Set Variable [$r; Value:MBS( "OCR.Initialize"; "/Library/FileMaker Server/"; "eng")]
End If

See also

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 11st May 2021


OCR.Initialize - OCR.IsLoaded