I need to integrate MathCAD v5 (1994) to my project. How can I do it? Do you know some good libraries or you know how use P/Invoke in this case?
Solved! Go to Solution.
C# and .NET were not in existence in 1994. Mathcad v5 (1994) used Dynamic Data Exchange (DDE).
The OLE automation interface is supported in Mathcad 7.02 and higher and supersedes the DDE
interface supported in Mathcad 5 and 6. For information on the interface, see the Developer’s
Reference under the Help menu in Mathcad.
The C# programming language was designed by Anders Hejlsberg from Microsoft in 2000 and was later approved as an international standard by Ecma (ECMA-334) in 2002 and ISO/IEC (ISO/IEC 23270) in 2003. Microsoft introduced C# along with . NET Framework and Visual Studio, both of which were closed-source.
In computing, Dynamic Data Exchange (DDE) is a technology for interprocess communication used in early versions of Microsoft Windows and OS/2. DDE allows programs to manipulate objects provided by other programs, and respond to user actions affecting those objects. DDE was partially superseded by Object Linking and Embedding (OLE), and is currently maintained in Windows systems only for the sake of backward compatibility.
C# and .NET were not in existence in 1994. Mathcad v5 (1994) used Dynamic Data Exchange (DDE).
The OLE automation interface is supported in Mathcad 7.02 and higher and supersedes the DDE
interface supported in Mathcad 5 and 6. For information on the interface, see the Developer’s
Reference under the Help menu in Mathcad.
The C# programming language was designed by Anders Hejlsberg from Microsoft in 2000 and was later approved as an international standard by Ecma (ECMA-334) in 2002 and ISO/IEC (ISO/IEC 23270) in 2003. Microsoft introduced C# along with . NET Framework and Visual Studio, both of which were closed-source.
In computing, Dynamic Data Exchange (DDE) is a technology for interprocess communication used in early versions of Microsoft Windows and OS/2. DDE allows programs to manipulate objects provided by other programs, and respond to user actions affecting those objects. DDE was partially superseded by Object Linking and Embedding (OLE), and is currently maintained in Windows systems only for the sake of backward compatibility.
Hi I have found a library that facilitates DDE in .NET
https://www.taltech.com/support/entry/using_dde_in_dotnet
The Visual Studio.NET application development platform does not support Dynamic Data Exchange (DDE) directly. There also appears to be no plans to incorporate DDE support into the .NET languages.
The best solution that we have found so far is an open source class library called NDde. The NDde class library is an extremely well designed Dynamic Data Exchange class library complete with sample code that shows how to use it as well as complete and well written user documentation.
Cheers
Okey, it is interesting solution, but so dificult. Maybe you know another way? For example, launch MathCAD by command line, send them formula / mcd file and get result in file? I try to implement this way, but dont know is it possible
Hi,
There is another way and this is to use C# SendKeys function.
https://devindeep.com/how-to-send-keys-to-another-application-using-c/
Zip file of example enclosed
Cheers
Terry
Cool, but I can't use this way, because I want to use function from MathCAD v5 in my Backend code, not UI such Windows Forms, WPF etc. I want to can calculate integrals, then send it to my client. Interaction: user go to the website, enter some data, then React / Angular send this data to my API, API calculate integral using MathCAD and return result
Hi,
Mathcad v5 (1994) has only DDE and SendKeys to my knowledge. Application Programming Interfaces post date Mathcad v5 (1994)
Cannot help you further
Cheers
Terry
Okey, thank you very much for taking the time and explaining the methods to me) Good luck!
Of course you can call the Mathcad application from within another program, and even supply it with a .mcd sheet file, but Mathcad will not calculate the sheet, or allow you to change any variables used on it without further interaction. And for that interaction with Mathcad 5, you do need the DDE interface, or could use sendkeys.
If you not want/need the Mathcad UI, then the integral (or whatever expression) you want Mathcad to calculate must be known in advance. If it is an integral, then the primitive might be determined also in advance (using Mathcad?), and you can implement that primitive in your API, instead of calling Mathcad to calculate the result...
Incidentally, why must it be Mathcad 5; are you actively running Mathcad 5 on a machine presently, or are you just planning to do that?
As far as I know you cannot install, let alone run Mathcad 5 under Windows 10 or later.
Success!
Luc
Good morning, thx for answer. This is the customer's requirement to use this version. Now I have mcad.exe with another files (DLL etc) in my PC and it works.
I decided to try it way, can you suggest, what is item (when send poke or request) in MathCAD DDE and example it?
Hi,
Sorry I have no access to Mathcad 5 or 6 to use the DDE.
You will need to use the help file old the program
Cheers
Terry
I too) okey, I will try experiment. Thx!