I'm developing a custom application that communicates to Mathcad Prime. I would like to ask few questions related to Mathcad Prime Interface as below:
Kindly share your inputs.
Thanks & Regards,
1. What do you mean by 'database used'? Almost every serious computer program uses a database of some sort. If not for functional reasons, then at least for administrative purposes, internally. You can think of the MuPad library of symbolic functions, bundled with Prime, as a database. Would you be able to access and/or manipulate that database via the API...? I think NOT.
2. There is an API available.
3. Since Prime is programmed in .Net, I would assume that you talk from .Net to the API.
4. The SDK, if you are referring to the suite of documentation of the API with examples of how to use it, is expensive. I seem to remember $5k. No, found it... it's $9k per company. Read this:
Followed the discussions on your link. Lots of complaints about the 9k.
Files are now:
D:\Program Files\Mathcad Prime 184.108.40.206
You can read the tlb file in Visual Studio Community 2015 like the discussion said to examine the objects, methods etc.
MCP has a "database" of input and output regions declared in a worksheet. Each input output has an "alias" in the database used to communicate data. You can manually change the names of aliases.
2. What are the interfaces / APIs available to integrate with a custom solution?
Two file are included in the Prime distribution
Using Visual Studio 2017 Community you "add a reference" to a project. Select Project | Add a Reference. select the COM section from the left hand menu. Use the Browse button go to the Mathcad Prime distribution and select the dll file. This will add the dll and tlb to the project and more importantly gives you intellisense on using the classes in the IDE and the classes are available in the object browser.
3. What language these APIs are developed? Are there any C# .Net interfaces available?
You can use in Visual Studio 2017 Community either Visual Basic or C# to program. Enclosed here is the visual C# that inputs and outputs to Mathcad both doubles and matrices of doubles
public partial class Form1 : Form
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click_1(object sender, EventArgs e)
var appCreate = new ApplicationCreatorClass();
app = (ApplicationCreator)appCreate;
ws = (IMathcadPrimeWorksheet3)app.Open(@"D:\\Prime\\VB\\Test.mcdx");
app.Visible = true;
IMathcadPrimeWorksheet wsTest = app.ActiveWorksheet;
ws = (IMathcadPrimeWorksheet3)wsTest;
wsTest.SetRealValue("B", 22.5, "");
IMathcadPrimeOutputResult resolve = wsTest.OutputGetRealValue("out");
output = resolve.RealResult;
textBox1.Text = output.ToString();
int i = 5;
IMathcadPrimeMatrix matrixValue = (IMathcadPrimeMatrix)ws.CreateMatrix(3, 3);
i = matrixValue.SetMatrixElement(0, 0, 2.5);
i = matrixValue.SetMatrixElement(0, 1, 4.0);
i = matrixValue.SetMatrixElement(0, 2, 3.1);
i = matrixValue.SetMatrixElement(1, 0, 1.5);
i = matrixValue.SetMatrixElement(1, 1, 3.6);
i = matrixValue.SetMatrixElement(1, 2, 5.0);
i = matrixValue.SetMatrixElement(2, 0, 7.2);
i = matrixValue.SetMatrixElement(2, 1, 4.8);
i = matrixValue.SetMatrixElement(2, 2, 6.8);
ws.SetMatrixValue("M", matrixValue, "");
IMathcadPrimeOutputMatrixResultAs hereResult = ws.OutputGetMatrixValueAs("here", "");
double wshereResultRowsCount = hereResult.MatrixResult.Rows;
double wshereResultColsCount = hereResult.MatrixResult.Columns;
for (int ic = 0; ic < wshereResultRowsCount; ic++)
for (int jc = 0; jc < wshereResultColsCount; jc++)
hereResult.MatrixResult.GetMatrixElement(ic, jc, out dblhere);
4. What would be the cost of SDK? and is it a bulk license or one license per developer?
Why spend the $9k for the examples. The intellisense feature of Visual Studio and the object browser gives you all the classes etc. Above is a simple example that works. There are a number of other examples available in this forum and on the www.
The API is built in to Prime. The SDK, you have to pay for (a ridiculous amount of money too). As far as I know, it works in the trial version. What are you trying to do?