Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Initializes the XL library by loading it.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XL | 2.9 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
LibPath | Native path to the DLL on Windows or Dylib file on MacOS. Can be empty for default file name with file in same folder as plugin. |
"C:\libxl\libxl.dll" |
LicenseName | The name of your libXL license. | "" |
LicenseKey | The license key of your libXL license. | "" |
Returns OK on success.
Initialize XL:
MBS( "XL.Initialize"; "/Library/FileMaker Server/Extensions/libxl.dylib"; "Test User"; "mac-43567890..." )
Initialize when needed:
#Initialize XL
If [MBS( "XL.IsInitialized" ) ≠ 1]
If [Get ( SystemPlatform ) = -3]
# iOS
Exit Script []
Else If [Get ( SystemPlatform ) = -2]
# Windows
Set Variable [$path; Value: "libxl.dll"]
Set Variable [$key; Value: "win-32213..."]
Else
# Mac
Set Variable [$path; Value: "libxl.dylib"]
Set Variable [$key; Value: "mac-32213..."]
End If
Set Variable [$r; Value: MBS( "XL.Initialize"; $path; "test"; $key )]
If [$r ≠ "OK"]
Show Custom Dialog [ "LibXL failed to initialize"; $r]
End If
End If
Initialize with license key on Windows with Server:
MBS( "XL.Initialize"; "C:\Program Files\FileMaker\FileMaker Server\Database Server\Extensions\libxl.dll"; "Test User"; "win-43567890..." )
Initialize automatically and look in same folder as plugin for the DLL/dylib/so file:
MBS("XL.Initialize"; ""; $LicenseName; $LicenseKey)
Register LibXL for MBS Plugin
If [ MBS("XL.IsInitialized") ≠ 1 ]
If [ MBS("IsMacOS") ]
Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "mac-xxx" )]
Else If [ MBS("IsWindows") ]
Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "win-xxx" )]
Else If [ MBS("IsLinux") ]
Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "linux-xxx" )]
Else If [ MBS("IsIOS") ]
Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "ios-xxx" )]
Else
Set Variable [ $r; Value: "new platform?" ]
End If
If [$r ≠ "OK"]
Show Custom Dialog ["Problem with LibXL Registration"; $r]
End If
End If
Init with automatic picking of library name:
MBS( "XL.Initialize"; ""; ""; "" )
// looks for libxl library in plugin folder.
Created 18th August 2014, last changed 23th March 2021
XL.Format.SetWrap - XL.IsInitialized
Feedback: Report problem or ask question.