How to change the Min and Max values of a result contour Legend in Mechanical?

Member, Moderator, Employee Posts: 242
50 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭

How to change the Min and Max values of a result contour Legend in Mechanical as highlighted below?

Comments

  • Member, Moderator, Employee Posts: 242
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    One can use Mechanical scripting to modify the legend min and max values as shown below (example for Stress plot. Unit needs to be modified according to the result type used).

    1. legendSettings = Ansys.Mechanical.Graphics.Tools.LegendSettings("MPa")
    2. legendSettings.SetMinMax(Quantity(0,'MPa'),Quantity(0.6,'MPa'))
    3. legendSettings.CopyTo(Ansys.Mechanical.Graphics.Tools.CurrentLegendSettings())

    Modified legend:

Welcome!

It looks like you're new here. Sign in or register to get started.