Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlight region color conditional to the results

Status
Not open for further replies.

Jerg

Structural
Mar 24, 2009
1
Hi, I would like to know if it is possible in Mathcad to highlight a region to a different color depending on the result.

ie: IF "condition is true" (highlight region would be green)
IF "condition is false" (highlight region would be red)

Thanks.
 
Replies continue below

Recommended for you

I've been looking for that functionality for years. If it is there it is well hidden. I'd also like to just be able to change the font and color of a single equaiton without changing the rest. I get the feeling that PTC isn't putting a lot of resources on MathCad and pretty isn't on their agenda at all.

David
 
There are a number of discussions on ways of (almost) achieving this on the mathcad collaboratory. But nothing as direct as you get with excel's conditional formating...
 
That's one of the workarounds, to use the embedded Excel capability to get its conditional formatting, while using Mathcad to do the calculations.

TTFN

FAQ731-376
 
Use visual basic script. It shows red/green like you want
but unfortunately doesn't print it. MathCAD needs to fix.
the VB script that controls the display of Text Box 2

Sub TextBoxEvent_Exec(Inputs,Outputs)
If Inputs(0).Value > Inputs(1).Value And Inputs(0).Value < Inputs(2).value Then TextBox.BackColor = vbGreen
TextBox.Text="GOOD"
Else
TextBox.BackColor=vbRed
TextBox.Text="BAD"
End If
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor