MattWoodhead / MathcadPy

A Python wrapper for the Mathcad Prime automation API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prime 7.0/8.0

dwdotson opened this issue · comments

Installed the package and it ran perfectly in Visual Studio 2019. I had both Prime 7.0 and Prime 8.0 installed. I hadn't been using 8.0 because our license server didn't recognize it. The code below found Mathcad 8:

from MathcadPy import Mathcad
mathcad_app = Mathcad()
print(f"Mathcad version: {mathcad_app.version}")

I noticed that 8.0 was now working so I deleted 7.0. When I reran the code, I got an error message saying that the Mathcad API could not be located. I deleted 8.0, reinstalled 7.0 and it works again. Seems like there is something different about Mathcad 8.0 that needs to be addressed.

Hi @dwdotson. Thanks for reporting. I am in the process of upgrading to Mathcad 8 at work, so I hope to start looking into this in the next week.

That is awesome news! I'm very excited about your project. I've written some custom functions for Mathcad in C, and combining that with your python interface could be a game changer for my company and some of the things we're trying to do.

Hi @dwdotson. It is great to know that it is helpful for other people!

Just to update you on the above issue:
I have installed Mathcad Prime 8 on a new computer with no previous installations, and was able to install and use MathcadPy with no issues. I believe what may be happening is that the uninstallation process of the earlier version of Mathcad is unregistering the COM server, despite the COM server class ID having been taken over by the newer version of Mathcad (see the slightly cryptic instruction from the installtion documentation below)

image

Are you able to try removing both installations and then installing only Mathcad Prime 8.0 without too much hassle?

Don't worry if not, in the mean time I am going to try and add a function to the library that will try to load the COM server as an unregistered COM API directly from the Mathcad installation directory if the registered server cant be found. This should hopefully solve the issue.