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

Change region color based on value?

ptc-1448485
1-Newbie

Change region color based on value?

Does anyone know if it is possible to change a region's color automatically based on a variable's value?

In Excel you can do this for a given cell so it will highlight if, for example, you go negative or meet some other criteria.

But in looking over conditional programs and using the if statement, I don't see any way for the highlight property to change. I'm hoping I just missed it.

Thanks for any help you can offer!

--Jim
16 REPLIES 16

On 7/25/2008 1:51:22 PM, jp_thermal wrote:
>Does anyone know if it is
>possible to change a region's
>color automatically based on a
>variable's value?
>
>In Excel you can do this for a
>given cell so it will
>highlight if, for example, you
>go negative or meet some other
>criteria.
>
>But in looking over
>conditional programs and using
>the if statement, I don't see
>any way for the highlight
>property to change. I'm
>hoping I just missed it.
>
>Thanks for any help you can
>offer!
>
>--Jim

You could use the Excel component to display the result, and use its conditional formatting to do what you want.

TTFN,
Eden

On 7/25/2008 1:51:22 PM, jp_thermal wrote:

== Does anyone know if it is possible to change a region's color automatically based on a variable's value?

No, you can't do it directly from within Mathcad , but it is possible to use scripted components to give some degree of this functionality.

There is a feature request for conditional formatting, http://collab.mathsoft.com/read?57028,12 , which also gives examples of such scripted components.

Stuart

You can use pictures with formulas and different bachground color.
I do so when I want to change formulas in the region:
http://twtmas.mpei.ac.ru/mas/Worksheets/IF_in_WorkSheet.mcd
Val

http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

Try Valery suggestion, it works.
For color blind persons ? !
Imagination is the limit.

jmG

On 7/25/2008 4:36:13 PM, jmG wrote:
>Try Valery suggestion, it
>works.
One practical task with changing formulas (pictures with white background!). Formulas are dependet from input and output values.
http://twt.mpei.ac.ru/MCS/Worksheets/Hydro/GDF.xmcd

Val
http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

This is a feature we are considering for the next release of Mathcad.

Mona

On 7/28/2008 12:36:45 PM, MonaZ wrote:
>This is a feature we are
>considering for the next
>release of Mathcad.
>
>Mona
What feature?
And what about others feature - see the subforum Feature Suggestions?


Val
http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

The feature we are looking at is similar to Conditional in Excel, which would change the color of a result depending on the value of it.

I record all the Feature Suggestions in a database to be considered for upcoming releases, along with other customer suggestions and feedback we receive.

Mona

On 7/29/2008 10:09:28 AM, MonaZ wrote:
>The feature we are looking at
>is similar to Conditional in
>Excel, which would change the
>color of a result depending on
>the value of it.
We need too:
1) Not number digits after point but common number of digits. See one example
http://twt.mpei.ac.ru/MCS/Worksheets/WSP/HPT-SI.xmcd
2) Hide the Variable Name and =
3) Hide "" in string answer
See axis title here http://twt.mpei.ac.ru/MCS/Worksheets/PTU/Rankine.xmcd
4) Financial format 1,000,000.00 or 1 000 000.00
5) Font Sise & Style (???)
6)
7) Continue please

Val
http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

Please post all feature suggestions in the Feature Suggestions Forum, not scattered in other forums.

Thanks,

Mona

On 7/29/2008 10:09:28 AM, MonaZ wrote:
>I record all the Feature
>Suggestions in a database to
>be considered for upcoming
>releases, along with other
>customer suggestions and
>feedback we receive.
>
>Mona

It will be good to publish this database and ask users (us) what thay (we) need in first line.
And ask PTC-programmers wath thay can do in first line.
And compare these two rates!

Val
http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

Has this ever happened?


@DrilonShabani wrote:
Has this ever happened?

Sure not! And given the way PTC cares about Mathcad best guess is that it never will.

Using scripted components it was (and still is) possible to achieve the effect in real Mathcad, but Prime, which is a huge number of big steps backward, does not support and provide scripted components at all.

Thanks everyone for the help and replies. I haven't done any scripting before, but this looks like a good reason to learn it.

Mona, I hope this does become a feature in future Mathcad releases. It's a very useful thing that we often use in Excel, and it's important to format outputs.

--Jim

In the mean time you get the "background" feature,

try making an image matrix, per say rectangular, onto which you slide a Mathcad result ... then change the color of the image to any of the 256^3 colors composition . For instance : if result > pi set the corresponding scalar of the image color from green to red.
So, here associate the color conditions for the scalars s0, s1, s2



jmG

Announcements