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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Mathcad Prime 10 - Textbox Script

JK_10652084
3-Visitor

Mathcad Prime 10 - Textbox Script

Hello, 

 

I am trying to utilize the new advanced controls textbox functionality by changing the background color of the textbox based on the input condition. 

 

The input condition would be a defined variable called "Ratio" and whether or not it is above or below 1.

 

The textbox would be assigned to the variable "Check", if Ratio is above 1 than check would read "No Good" with a red background, If Ratio is above 1 than check would read "OK" with a green background. 

 

I have been searching through previous posts and had some help but am getting stuck with what appears to be passing in input variable "Ratio". I keep getting the following error. 

JK_10652084_0-1718032057074.png

I have put the file I am working on below for reference. 

JK_10652084_1-1718032517677.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Have you seen this thrread: https://community.ptc.com/t5/Mathcad/Mathcad-Prime-10-Text-Box-Advanced-Controls/m-p/952254/highlight/true#M212069

Looks like it solves your problem.

 

BTW, the Textbox in the sheet you posted contains no script at all!

View solution in original post

3 REPLIES 3

Have you seen this thrread: https://community.ptc.com/t5/Mathcad/Mathcad-Prime-10-Text-Box-Advanced-Controls/m-p/952254/highlight/true#M212069

Looks like it solves your problem.

 

BTW, the Textbox in the sheet you posted contains no script at all!

Hi Werner_E, 

 

Yes I have used that reference you posted. it was very helpful. My issue was adding the input variable when right clicking the textbox box. I should have added my variable this way instead of trying to pass it in within the script. I than can collapse the input variables so only what I want to see is shown. 

JK_10652084_1-1718035810331.png

 

JK_10652084_3-1718035843275.png

 

JK_10652084_2-1718035828616.png

 

I appreciate your help. 

Thank you!

Fine that you found how to use it - its not really intuitive (especially when we have more than one input value).

You know that you can also hide the lefthand side (the "check:=") and collapse the space it would occupy. That way only the textbox is visible. See Solved: Re: Mathcad Prime 10 TextBox - PTC Community

Top Tags