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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Translate the entire conversation x

Selecting Python in advanced controls crashes MathCad Prime 11.0.0.0

MV_14109962
3-Newcomer

Selecting Python in advanced controls crashes MathCad Prime 11.0.0.0

I want to use Python scripting in MathCAD Prime 11, but upon selecting python in the dropdown menu in the advanced controls editor, MathCAD hard crashes. I don't even get a chance to press "apply" or close the dialogue box. Everything closes. There is no stalling or freezing. It just crashes instantly. No error message is produced.

 

What is going on? How do I fix this?

 

My understanding is that, if Python shows up as an option, MathCAD has registered to appropriate location for the python executable. Is that correct?

 

Python version 3.9.18

 

Steps.

 

1. Start MathCad with blank worksheet.

2. Insert Advanced Control "Text Box"

3. Name variable "aaa0" (or anything really).

4. Right-click on the text box and press "edit"

5. In scripting language drop-down box, select Python

6. Watch MCP 11 crash.

6 REPLIES 6

Well, I can't replicate your issue...

 

 

Did you set the options here?

(The last one)

 

DJNewman_0-1767740433008.png

 

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.

So, the answer to one of my questions

 

"My understanding is that, if Python shows up as an option, MathCAD has registered to appropriate location for the python executable. Is that correct?"

 

is that it is not correct.

 

I didn't have the option selected, and contrary to the wording, it wants the path the executable instead of the folder.

 

However, I am met with the following error in the advanced controls dialogue box.

 

MV_14109962_0-1767801670450.png

I've also tried what has been posted in this forum post (at least I think I did what was described here), and it did not work either.

Prime 11 with Anaconda3 Python 

Werner_E
25-Diamond I
(To:MV_14109962)

Prime seems to support just a limited range of Python versions.

 

According to Python for Advanced Controls

"If you have the required version of Python installed on your system, it will be automatically registered for use in PTC Mathcad Prime 11.0.0.0."

 

The supported Python versions according to Advanced Controls  are

"PTC Mathcad Prime scriptable controls support VBScript, JScript ES3, and Python 3.7 to 3.13."

 

Does your Python version meet this requirement?

 

EDIT: Ahh, sorry! I overlooked that you already wrote that your have version 3.9.18 installed. So as I understand it it should have been automatically registered with Prime and should(!) work.
Does the path to your Python installation show up in the options as shown in the screenshot from @DJNewman  ?

You may consider opening a case at official PTC support.

I should maybe add that I am using Anaconda3.

 

The previously linked forum thread was given because it was relevant to Anaconda3.

 

This is what my "options" tab looks like.

 

MV_14109962_0-1767818995845.png

In any case, I do agree that I will probably need to open a support ticket with PTC.

Werner_E
25-Diamond I
(To:MV_14109962)

When I compare your screenshot with that of @DJNewman  I notice that his only shows the path to (without the closing "\" and without "python.exe"), but not the executable itself as in your screenshot.

You may try to include the path to the executable (only the folder) in the Windows PATH variable and then try a reinstall of Prime. It should(!?) automatically register Python for use.

But then, maybe PTC support has a better idea or is aware of any problems and knows a workaround.

Without reinstalling the software, because I am required to get IT to do all things requiring admin access, I can say that removing the "\python.exe" causes MathCAD to catastrophically crash just like before. I will just have to open a new ticket.

Announcements

Top Tags