SimplePlugin

SimplePlugin is template for FileMaker external function plug-ins geared towards experimentation and quickly testing ideas.

The template is also written such that it should make a (comparatively) easy starting point FileMaker developers who wish to learn about, and experiment with, writing FileMaker plug-ins. Comparatively should be taken with a grain of salt: you still need C/C++ and the plug-in API is essentially undocumented.

Version: 1.0.2 [ Download / On GitHub ]
Date: April 6, 2017

Getting Started

In general creating a new plugin requires little more than: renaming the project file, writing a function and compiling. Just…

  1. Make a copy of the SimplePlugin directory

  2. Download the FileMaker External Function Plug-In library and place FMWrapper.framework (Xcode) and the Headers directory and FMWrapper.lib (Visual Studio) in the new project directory. Rename the Headers directory to FMWrapper.

  3. Rename the SimplePlugin.xcodeproj and/or SimplePlugin.sln files.

    The name of the project is used as the name of the plug-in and also for the four letter prefix that is attached to function names (a function IsComputerOnFire in a plug-in called Testing will appear in the list of external functions as Test_IsComputerOnFire) and so the name should only contain characters that are acceptable as function names within FileMaker and should only use letters or numbers as the first four characters of the name.

  4. Open the renamed project file

  5. Create a new function

    A sample function is included in the template as an example (thus to simply explore the template this step and the following one to register the new function can be safely ignored)

  6. Register the function in the Init function

  7. Build and debug the new plug-in

Plugins are build directly in the user extensions directory for FileMaker:

~/Library/Application Support/FileMaker/Extensions/

on the Mac and

$(HOMEDRIVE)\$(HOMEDIR)\AppData\Local\FileMaker\Extensions\

for Windows 7.

Additional information on using the template is included in the comments in the source.

Resources for writing FileMaker Plug-Ins

Sadly, sources of information on writing FileMaker plug-ins are few and far between. The most notable are:

  1. Chapter 5 of the FileMaker Pro 11 Advanced Development Guide

  2. fmplug-prog-list - FileMaker Plug-in programmers mailing list

  3. Kent Lendrum's FileMaker Plugin Developer Resource wiki

  4. There's an excellent, albeit a little dated, summary of all the Filemaker API (plug-in SDK) header files from Van der Linden Cultural Services

  5. FileMaker's example plug-in (shipped on the CD for FileMaker Developer/Pro Advanced for versions 7 through 10, but not with v11)

  6. The 24U Plug-In Template

  7. BaseElements Plug-In Source Code

  8. FM-PLUGIN-TOOLS - A toolkit for FileMaker plug-in development in Common Lisp

  9. Keystone, an open source FileMaker plug-in

Known Bugs & Limitations

In designing the template with both short term simplicity and use as a learning tool in mind a couple of things needed to give… notably:

  1. No support for localisation

  2. Only a limited sub-set of the API is used: preferences, running in idle-time etc. are not handled

  3. Functions must always be registered in the same order to be recognised as the same function by FileMaker

  4. There is no support for versioning

  5. C/C++ usage is over simple: it's all in one file, there are no classes, no exception handling and the rather limited text manipulation functions provided by the API are used rather than STL strings, etc..

These are easily addressed, however, whilst doing so would make this a better template for production plug-ins the additional complexity (and lines of code) would run counter to the aim of reducing the effort required for exploring and testing ideas.

Project Files

File NameDescription
SimplePlugin.cppThe source code for the plug-in
License.txt
Web Site.urlA link to this page
SimplePlugin.xcodeprojXcode 8.3 project file
Info.plistRequired by the Xcode project
SimplePlugin.slnVisual Studio 2017 solution file
SimplePlugin.vcxprojVisual Studio 2017 project file

Feedback, Suggestions & Bug Reports

Please send any feedback, suggestions or bug reports via the Contact form. If you have a suggestion for how this might be improved I'd be very interested to hear from you.

License

Copyright (c) 2010-2017, Mark Banks
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Contact | Home | FileMaker | FileMaker Plug-ins

© 2010-2013 Mark Banks. Last modified: April 6, 2017