Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual C++ 6.0 to write user DLL for Mathcad 2000

Visual C++ 6.0 to write user DLL for Mathcad 2000

Visual C++ 6.0 to write user DLL for Mathcad 2000

I compiled and built the example file 'multiply.c' provided in the userfi folder. I copied 'multiply.dll' file to userfi folder and added function info in 'user.xml' file, but when I wanted to used the function, my function does not appear in the list of user functions.

I used Microsoft Visual C++ 6.0. The provided text file says they tested for Visual C++5.0, and do not gurantee if it works with the later versions.

Have anybody used VC++6.0 to create user dll that can be run on Mathcad 2000? If so, could you please email me a sample, so I could see if it works on my machine?


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

You need to register the DLL.  Have you run REGTOOL from the Mathcad folder?


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

Hi IRstuss,
Now I am able to see the user functions without invoking REGTOOL. I realized, the problem was with the dll itself.

I am disappointed with MathSoft that they allow so little freedom to us as to the functionality. I wish Mathsoft be bit more open minded and liberal.

RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

I'm not sute what you mean.  There have been some pretty good DLLs written by various people.  

An overly flexible interface is simply asking for trouble from a support perspective.  By limiting the scope of the interface, Mathsoft limits the number of potential problems and incompatibilities that might occur.


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

In my experience I have never had to use REGTOOL with the DLLs I have written.  I have used both Microsoft Visual Studio 6.0 and the freeware Dev-Cpp to produce code.

I agree with CAOranger about the interface being too narrow.  Being able to pass string data (as opposed to arrays of characters) would certainly be a start.

The last time I did this was with Mathcad 2001, has anyone written DLL code to interface to the newer versions?  How does the programming interface compare to earlier versions?  Hopefully there have been improvements.


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

AFAIK, the interface is unchanged through V12beta3.


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

Facility to pass strings would be helpful!

After spending weeks playing with the mathcad user DLL thing, I decided, it is not worth spending time.

I have not seen any examples in the web or elsewhere where the user dll could display more than one lines (stings & numbers). My problem is - regardless of how accurate I am, if my dlls do not show some critical intermediate results, even my co-worker would hesitate to use it for serious purpose. The first thing the person reviewing my calculations would question validity of the result. Even if I look at it after a month, I would be spending time to check the algorithm again before useing it.

If the dlls are for myself, I do not see any use of spending time writing and debugging dlls -- mathcad spreadsheets alone are adequate.

I feel mathsoft would not like to give too much control to developers; is being too overprotective.

RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

I ran across a Mathcad DLL awhile back (>2 years ago) that used an efficient way of passing data between the Mathcad worksheet and the user DLL.  Basically, functions were written in the worsksheet that would "pack" the data into a single array, then shove it over to the DLL, and the DLL would then "unpack" that array into the different data types -- complex arrays, strings, etc.  I'll see if I can dig it up.


RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

I found the files I was looking for. :)  I ran across them a year ago and had to find the URL again.

Browse over to http://gundermann.dk/mathcad/poisson_engine.htm to see a really good example of passing and returning complex data between Mathcad and a user DLL.

All of the Mathcad "pack" and "unpack" functions are available, as well as the .c source file used to perform the processing.

Hope that helps!

RE: Visual C++ 6.0 to write user DLL for Mathcad 2000

Thanks Matt,
I will look at the code if I can learn something new from it....

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close