OCR.SetVariable
---------------

Sets a variable.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [OCR](component_OCR.md) | [7.5](newinversion75.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "OCR.SetVariable"; Name; Value ) 

**MBS**( **"OCR.SetVariable";** /\* Sets a variable. \*/  
**$Name**; /\* The name of the variable.e.g. "test" \*/   
**$Value**) /\* The text value for this variable.e.g. "123" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | The name of the variable. | "test" |
| Value | The text value for this variable. | "123" |

### Result

Returns OK or error.

### Description

Sets a variable.  
### Examples

Set variable for white list characters:

 MBS ( "OCR.SetVariable"; "tessedit\_char\_whitelist"; "0123456789" )  
Set variable for black list characters:

 MBS ( "OCR.SetVariable"; "tessedit\_char\_blacklist"; "xyz" )  
### See also

- [OCR.GetVariable](OCRGetVariable.md)
- [XML.SetVariables](XMLSetVariables.md)

### Release notes

- **Version 7.5**
    - Added [OCR.GetVariable](http://www.mbsplugins.eu/OCRGetVariable.shtml) and [OCR.SetVariable](http://www.mbsplugins.eu/OCRSetVariable.shtml) functions, e.g. to enable number only mode.

### Blog Entries

- [MBS FileMaker Plugin, version 7.5pr6](https://www.mbsplugins.de/archive/2017-11-06/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 2nd November 2017 , last changed 2nd November 2017

  
[OCR.SetResolution](OCRSetResolution.md) - [OCR.Version](OCRVersion.md)

[HTML Version](OCRSetVariable.shtml)