Skip to main content
1-Visitor
July 21, 2021
Question

creating globally accessible user-defined functions

  • July 21, 2021
  • 2 replies
  • 961 views
I am using Mathcad 15.0 unknown

I need to create several user-defined functions which are globally accessible to many programs in the same way in which built-in functions are accessible. preferably, i would like my user-defined functions to be located within a separate directory/file than the programs which will be using them.

i need some assistance in doing this.

Donald MacNeil

    2 replies

    21-Topaz II
    July 21, 2021

    Hi,

    Mathcad has the ability to define user functions.  Go to Help | Developer's Reference.

    The help defines the process in a simple and adequate manner.

    You can create a DLL user function.   They are kept globally in the Mathcad/userefi directory of the Mathacd installation and accessible to any worksheet.

    Two samples DIGAMM and KRONECKR are provided.

     

    It is found in the use

    Capture3.JPG

    Capture4.jpg

    Capture5.JPG

    Cheers

    Terry

     

     

    21-Topaz II
    July 21, 2021

    Hi,

    The other way to define global functions is to program them in Mathcad in a separate file.  You can at the top of any new file reference in the global functions file.

    I do this with a custom file that defines some functions and units.

    You use Insert | Reference on the toolbar.

    A dialog box opens where you identify the file and insert the reference file.

    Any variables, units, functions in the reference file are now available in the new file.

    Cheers Terry

    Capture3.JPG

    Capture4.jpg

    Capture5.JPG