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

Options
Rohith Patchigolla
Rohith Patchigolla Member, Moderator, Employee Posts: 130
First Answer First Anniversary Name Dropper Solution Developer Community of Practice Member

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

Comments

  • Rohith Patchigolla
    Rohith Patchigolla Member, Moderator, Employee Posts: 130
    First Answer First Anniversary Name Dropper Solution Developer Community of Practice Member
    Options

    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).

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

    Modified legend: