cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Connecting MathCAD to an external database and a web app

dkuttikrishnan
1-Newbie

Connecting MathCAD to an external database and a web app

I am a computer science student at the University of Aberdeen and I'm working on a project in partnership with Chevron in Model Code Design Tool. Its used to design pipelines in the oil and gas industry. Since my background is in pure computer science, I've never had a chance to use MathCAD before and my knowledge in this software is very minimal.

In my project, I'm supposed to make a web app, based on HTML and PHP, and a database (possibly MySQL) and connect it with MathCAD for the calculation part. The basic idea is that a user can input new data through the web app, storing it in the database and when they need to process it, MathCAD should come into action. I have made a working front end and back end, but I'm not sure on how to connect MathCAD with the database. If its not possible, will it be possible to connect it with an Excel spreadsheet (to be used in the place of a database) and then access it? Can anyone guide me through this process? I am a total newbie in this software.

Thanks in advance!

8 REPLIES 8

Hi Deepak.

First, you must to specified the mathcad version. There are two: MC15 and Prime, last version, 3. Mathcad Prime goes to have a new version 4, with some of the mathcad 15 functionalities, but mathcad 15 is the last version: there are no chance for a mathcad 16. That's not a good new for a new project if it goes to be based in mathcad 15.

For mathcad 15, open the help and look under "External files and applications". In "ODBC input component, you can call a microsoft access data base installed as data source in windows. This came from windows 95, or maybe from WFWG 3.11. Don't know if can access to a MSQL database, but with the appropriate drivers, I guess that it could be.

For excel, have an excel component. Inside an inserted excel file you can make there web querys with the excel tools.

With a script component can call a data base query with vb script.

Finally, there are other version of mathcad, that operate as web server, but, as I know, is discontinued.

For Prime versions, you don't have any of those features, except excel, but with the new Prime version 4, seems that components and database query's go to be reintroduces.

For the web server for prime can see this: PTC Mathcad Gateway calculation server data sheet

Best regards.

Alvaro.

Hi Alvaro,

Thank you for your reply. I am using MathCAD Prime 3.1, and also have MathCAD 15 since some of the old data files needs to be converted to the newer version and is possible only through this. Anyhow,, I guess i'll stick on to MathCAD 15 for the time being as my project is only for 6 weeks and I can't wait until a newer version of MathCAD Prime comes in. But, what I can do is to work on with the original one and then post the further works once a new version arrives.

Once again, thanks for your valuable reply!

Warm regards,

Deepak Kuttikrishnan

Hi Deepak,

Mathcad, with the exception of Valery Ochkov's web-based server, isn't really geared towards working with browsers. You'll have to work through the API, the utility of which depends upon the version of Mathcad you're using. Mathcad 15, the last of the "Original" generations of Mathcad, has objects called components, one of which allows direct ODBC connectivity.  The "New" generation of Mathcad, called Mathcad Prime, has a more extensive (and expensively documented) API, but doesn't have ODBC. You automatically get a free licence for Mathcad 15 if you have Mathcad Prime, as M15 is needed to convert old generation worksheets into Prime format.

Both generations of Mathcad will import Excel - look up Excel in your Mathcad Help, and do a search for Excel in this forum.

Stuart ... from Sunny Glasgow.

Hi Stuart,

Thank you for your reply. I guess i'll stick on to MathCAD 15 as this is a small project of 15 days and I cannot wait for a newer version of Prime to be released with the database capabilities. Excel is fine for me, as for the moment, I am only working on a proof of concept for a PhD thesis of my mentor. I will look into it and will contact you if I have any trouble with MathCAD.

Thank you.

Warm regards,

Deepak Kuttikrishnan

Offtop.

StuartBruff wrote:

... Stuart ... from Sunny Glasgow....

And we will run to a brand new sun...

Perhaps the attached example of the use of JavaScript and regular Mathcad will help you.

Thank you for the valuable reply. I will try this and let you know.

Warm regards,

Deepak Kuttikrishnan

Top Tags