After you create a user-defined function, you can call it either from the same mapping where you created it, or from any other MapForce mapping. For information about creating a function, see Creating User-Defined Functions.
To call a user-defined function from the same mapping:
|1.||Find the function in the Libraries window. You can find the function under the library that you specified when you created the function. If you created the function in the default "user" library, look for the function in the "user" library. To quickly find the function by its name, start typing the name in the Libraries window.|
|2.||Drag the function from the Libraries window into the main mapping. You can now connect to it all the required parameters. The result of the function is provided by its output parameter (or several parameters, if applicable).|
To import a user-defined function from another mapping:
|1.||Click the Add/Remove Libraries button at the base of the Libraries window.|
|2.||In the Options dialog box, in the Libraries page, click Add, and browse for the mapping file (.mfd) that contains the user-defined function.|
|3.||Click OK. The function now appears in the Libraries window from where you can drag it into the main mapping.|
By default, the Libraries window displays only built-in functions and any user-defined functions in the current .mfd mapping file. If you import other .mfd files as libraries into the current mapping as shown above, it will display user-defined functions from any imported files as well. Moreover, if you used the same library name across multiple *.mfd files, functions from all available sources appear under the same library name in the Libraries window.
© 2019 Altova GmbH