Preview.Release
---------------

A convenience method to release all preview controls.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Preview](component_Preview.md) | [13.3](newinversion133.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Preview.Release"; PreviewRef ) 

**MBS**( **"Preview.Release";** /\* A convenience method to release all preview controls. \*/  
**$PreviewRef**) /\* The reference ID for this preview control.e.g. $ref \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PreviewRef | The reference ID for this preview control. | $ref |

### Result

Returns OK or error.

### Description

A convenience method to release all preview controls.  
### Examples

Close preview if needed:

 If \[ $$preview \]   
 Set Variable \[ $r ; Value: MBS ( "Preview.Release"; $$preview ) \]   
 Set Variable \[ $$preview ; Value: "" \]   
End If  
### See also

- [MapView.Release](MapViewRelease.md)
- [Preview.Create](PreviewCreate.md)
- [Preview.CreateWithControl](PreviewCreateWithControl.md)
- [Preview.ReleaseAll](PreviewReleaseAll.md)
- [Preview.Unload](PreviewUnload.md)

### Example Databases

- [PDF Viewer](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/PDF%20Viewer.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS Plugin Advent calendar: 18 - Preview](https://www.mbsplugins.de/archive/2023-12-18/MBS_Plugin_Advent_calendar_18_/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 12nd June 2023 , last changed 29th June 2023

  
[Preview.LoadFile](PreviewLoadFile.md) - [Preview.ReleaseAll](PreviewReleaseAll.md)

[HTML Version](PreviewRelease.shtml)