Developer’s Guide

Table Of Contents
Chapter 10
Understanding external function plug-ins
If you are a C or C++ programmer and familiar with advanced
calculations in FileMaker Pro, you can create external function plug-
ins that extend the feature set of FileMaker Pro—including
calculation formulas that take advantage of recursion and looping, or
that hook into other programming interfaces. Users can enable your
plug-ins in FileMaker Pro and use your external functions in their
calculation fields and scripts.
FileMaker Pro plug-ins must be registered with FileMaker, Inc. The
FileMaker, Inc. web site (www.filemaker.com) includes a plug-in
registration form and a database of all the registered plug-ins. You
can browse this database to get an idea of what kind of plug-ins
already exist and use it to list your own plug-ins. See “Registering
your plug-ins” on page 10-13 for more information.
About external functions
The FileMaker Developer 5.5 CD includes an example plug-in
project that you can modify to include your own external functions.
Users can access your plug-ins through the FileMaker Pro Specify
Calculation dialog box.
Follow these general steps to prepare your custom plug-ins:
1. Edit the example plug-in files to add your custom programming
code.
2. Compile and test the customized plug-in.
3. Register your functions with FileMaker, Inc.
4. Install the compiled plug-in file for your users.
To access your custom functions, your users do the following:
1. Enable your plug-in through the Application Preferences dialog in
FileMaker Pro.
2. Configure your plug-in, if required.
3. Define or edit a calculation field in FileMaker Pro.
4. In the Specify Calculation dialog box, choose
External(function_name) as the calculation formula.
About the plug-in example file
The example plug-in project is designed to illustrate what a complete
FileMaker Pro plug-in looks like. You can compile the example
project files to create a plug-in with several external functions that
users can access through the Specify Calculation dialog box in
FileMaker Pro.You can examine and modify the source code of these
examples and templates in any text editor.
The plug-in example includes five useful external functions (see
“Description of the FMExample plug-in’s external functions” on
page 10-3).
The plug-in example files include all the source code required to
compile the plug-in for the Windows, Mac OS, and Mac OS X
platforms. In addition to the plug-in source code, FileMaker
Developer includes project files for CodeWarrior 4, CodeWarrior 6,
and Microsoft Developer Studio.
The example plug-in files are located in the
\Developer Extras\FileMaker, Inc\FileMaker APIs\FMExample plug-in\
folder on the FileMaker Developer 5.5 CD. The plug-in example
source code files are located in subfolders in the FMExample plug-
in folder. The following tables describe some of the files.