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

Connecting to different instances of Mathcad prime 4

Regular Member

Connecting to different instances of Mathcad prime 4

I am using Mathcad Prime SDK 3.1 for Mathcad Prime 4 to automate some time consuming calculations and worksheet management. As described in SDK, the communication is done over an

ApplicationCreatorClass() call. This works more ore less fine but I cannot control to which running Mathcad instance the link will be performed. My question is: Is there any way to establish connections to different  Mathcad instances running on the same computer?

6 REPLIES 6

Re: Connecting to different instances of Mathcad prime 4

Is there any way you can get the process ID number (PID) of the application instance that you are connecting/ connected to?

 

Luc

Re: Connecting to different instances of Mathcad prime 4

Yes. I can get PIDs of all running instances with

System.Diagnostics.Process.GetProcesses().

I tried another way with OLE32.dll:

Reading out the ROT (running object table) with the IMoniker interface, as it is described for EXCEL connection. After getting a running COM object instance the .Net interface or class must be known like here:

if (lComObject is Microsoft.Office.Interop.Excel.Workbook)

{

Microsoft.Office.Interop.Excel.Workbook lExcelWorkbook = (Microsoft.Office.Interop.Excel.Workbook)lComObject;

...

}

I tried to substitude "Microsoft.Office.Interop.Excel.Workbook" with the automation interface class of Mathcad and also with its Application class but there was no match.

 

 

 

 

Highlighted

Re: Connecting to different instances of Mathcad prime 4

Hello LucMeekes,

excuse me that I ask you directly, but there is nobody here who has experiences in that except You.

I am always looking for the solution of connecting to different instances of mathcad.
Do you have any more suggestions for me?

Re: Connecting to different instances of Mathcad prime 4

Hello,

 

did you already ask PTC Support ? If not, please give them a chance...


Martin Hanák

Re: Connecting to different instances of Mathcad prime 4

Thank you,

I didnt but I will do now a request.

Re: Connecting to different instances of Mathcad prime 4

You can use the "Case Logger" tool on PTC's eSupport portal to open technical support case: https://support.ptc.com/apps/case_logger_viewer/auth/ssl/log