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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Color coded results

TH_10254372
10-Marble

Color coded results

How do I get Mathcad Prime to give me colored coded results. If the result is Pass, return color in Green and if fails, Red? Please help

 

 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:TH_10254372)

Indeed, that "conditional.....-prime-8.mcdx" file is a Prime 9 file.

The attached should work for you.

 

Success!
Luc

View solution in original post

16 REPLIES 16

Hi,

Color coding of results can only be done manually using the math formatting tools.

Others have made the same request for automatic coloring..

Cheers

Terry

As of Mathcad Prime 9, there's no direct way to do this, but one workaround involves putting the results in an Excel Component as an Input Expression, and use Conditional Formatting there.

 

DJNewman_0-1679081072043.png

 

DJNewman_1-1679081104993.png


I recommend voting up this Idea: https://community.ptc.com/t5/Mathcad-Ideas/Conditional-formatting-of-outputs/idi-p/736333

 

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

Hi Thanks a lot. This is what I need to do. Unfortunately I am new to mathcad so I struggled to do what you said but didn't figure it out. I understand your response is if you have the data on a excel sheet. 

I was hoping to just format the sheet to give me response based on info on the same sheet.

For example: My sheet has "q(allowable)" , and I find "q", how do I make the sheet to give me green if OK and red if Not OK. Please do a step or uplaod a mathcad sheet where you did it. Thank you

TH_10254372_0-1679328806434.png

 

Attached a worksheet!

 

See if that helps and if you can figure out the rest on your own! I don't know the math behind q and the maximum allowable q so I just defined those as variables (and a combo box for fun), but you can replace those with whatever and it should work.

 

You can press the - by the Excel Component's input expression to hide it. The magic is that Excel Component input expression being equal, in this case, to qcheck, and if you double-click the Excel Component to open Excel, setting Excel's Conditional Formatting rules to activate upon "OK" or "Not OK" values.

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

Opps. I have Mathcad Prime 8 and you seem to be using a more recent version so I am not able to open it. 

Ah hah... You should upgrade to Mathcad Prime 9!

 

But here is the same sheet in Prime 8.

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

Thank you. But I am still getting the same message . Was this new one made in 8? not sure why it's still not opening when I have 8. 

TH_10254372_0-1679341233631.png

 

LucMeekes
23-Emerald III
(To:TH_10254372)

Indeed, that "conditional.....-prime-8.mcdx" file is a Prime 9 file.

The attached should work for you.

 

Success!
Luc

Thank you, it works

Hello Thank you again. you and @DJNewman . As I have mentioned I just started using mathcad so I am lost. Apologies for my question if these are supposed to be easy lol. I was able to use the sheet you sent me but I am still not able to make my own. I searched on youtube but can't find a step-by step tutorial.

1. How did you define a variable with a drop down table like this 

TH_10254372_0-1679410195530.png

2. Did you type "Not Ok" in the excel sheet and then assign the color under conditional formatting  and then while that same sheet is opened, type OK and assign the color?

TH_10254372_1-1679410479986.png

 

 

Sorry that my "prime-8" worksheet still tries to open in Prime 9... I thought I had Prime 8 opened while saving it.

 

The variable drop-down list is called a Combo Box. Here is a video on how to use it and what it does. You don't need the Combo Box for this problem (since I assume you are calculating q based on some kind of formula or series of calculations), but I thought making one would be convenient for testing the conditional formatting:

https://www.youtube.com/watch?v=GOoVL714Bz8

 

The only thing I did in Excel was the Conditional Formatting rules for the colours to activate upon "Not OK" or "OK", as well as stretching A1 and increasing the font size.

But the actual result of whether it is OK or Not OK is based on the result of qcheck, and you can see in the Excel Component input expression that Mathcad passes the value of qcheck into A1 of the Excel Component

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Mathcad Prime 7 introduces combo boxes, allowing you to control calculations in your worksheet with easy to create drop-down menus of variable definitions. Pre-define variables and variable values associated with calculations in which you might want to consider more than one variable. Once the ...

Thank you so much 

Raiko
17-Peridot
(To:DJNewman)

Although this is a viable workaround it has drawbacks:

 

  1. An extra component has to be used where a plain colour change of the font e.g.; from black to red would suffice.
  2. It is taking up document space. When using this document for, say, documentation it has to be tidied up before submitting.
Raiko
17-Peridot
(To:TH_10254372)

It would be great if you'd add your request to the feature suggestions. This is something I'm desperately hoping for since I do have to check calculation documents of 40+ pages length. 

Any result highlighting, aka. conditional formatting, in MC  prime would be welcome.

ttokoro
20-Turquoise
(To:TH_10254372)

Without EXCEL Component.

image.png

image.png

Thank you a lot

Announcements

Top Tags