General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Unable to edit Mechanical Contour Legend

    • mjoyce123
      Subscriber

      I had Ansys 19.2 and recently upgraded to 2021 R1. Since getting 2021 R1, I have been unable to enter in my own values for values of each contour color. I double click on the number to edit it but nothing happens. I have also right clicked on the number and clicked Edit but nothing happens. I am not trying to edit the max or min number as I know those are not editable.


      Is there some option or anything that is enabled that is not allowing me to edit these numbers?

    • Rameez_ul_Haq
      Subscriber
      It should get edited. 2021R1 is no different in terms of what you are asking for. Maybe you didn't open the 'Num Lock'.
    • mjoyce123
      Subscriber
      No unfortunately "Num Lock" isn't the issue.
    • Rameez_ul_Haq
      Subscriber
      Then I would recommend try editing the max and min, or one scale below the max and min. See if it is working or it is also not working.
    • mjoyce123
      Subscriber
      I've tried editing all the scale values and none of them work. I can drag down the scale to change the values, but I cannot manually type in numbers for any of them
    • Rameez_ul_Haq
      Subscriber
      Then I don't know cause it has never happened to me. Maybe an ANSYS employee can help you here.
    • Robert Polsgrove
      Subscriber

      Was there any resolution to this?  I am having the same issue.  Saved, closed, and re-opened the file.  Restarted computer same issue.  Uninstalled and reinstalled software and same issue.

    • Ankush Choudhary
      Ansys Employee

      Hi,

      Could you please update your graphic card driver?

      Thanks,

      Ankush

    • Robert Polsgrove
      Subscriber
      Nvidia RTX 3070ti updated to latest driver.  Issue remains.
    • jbroughton
      Subscriber

      I have the same issue. Mechanical 2022 R2. Graphics card driver is up to date. Restarted and reinstalled. Issue seems to be unstable, sometimes it will work, sometimes it won't.

    • Michael Joyce
      Subscriber

      I contacted ANSYS support about this issue, and the issue was the graphics card. The work around that they gave me was to use a script to change the contour bands.

       

      ls=Ansys.Mechanical.Graphics.Tools.CurrentLegendSettings() 

      # Number of contour bands on legend
      ls.NumberOfBands =6

      ls.Digits=4

      # Set which band, the value, and units
      ls.SetLowerBound(0,Quantity(0,"mm"))
      ls.SetUpperBound(7,Quantity(0.0476,"mm"))

    • Audun Mathias Øvstebø
      Subscriber

      How do I implement the script? Do I add a "python code" module to the solution? How do I relate it to the different results?

    • Michael Joyce
      Subscriber

      You just need to go to the Automation tab, and click Scripting and enter the code. To change the contour band of a certain result, you just have to have that result selected before running the script. The script runs on whatever current results are being displayed.

      • miguel.weber
        Subscriber

         

        Having the same issue to not edit my scale.

        Used the skript and it worked. 
        But ANSYS should be aware of the problem and try to solve it. 
         
        Edit: I use a Dell Precision Workstation 5560 and work with a T1200 Nvidia GPU. I hope that helps.

         

         

         

    • Vivekanandan A
      Subscriber

      Hello Ansys Team, 

      Any solution to this query? I also face the same issue. 

      • Robert Polsgrove
        Subscriber
        I was having this issue on a computer that had Nvidia RTX 3070 ti and also had integrated intel iris graphics.  Windows was using both graphics cards for different tasks.  The solution was to disable the intel graphics so that the computer would only use the Nvidia graphics card.  Using device manager you can confirm the presence of two display adapters.  If so, you will need to research how disable the onboard graphics and only use the Nvidia graphics.  This was a while back and I do not remember the process.  If I recall correctly, there were several steps I had to take to make this work and stick.  I think I was able to disable the onboard graphics from device manager.  After that I could start ansys and the problem was resolved, but that the issue would come back after a restart. I think the computer would restart the onboard graphics.  I believe there are more settings in the Nvidia control panel that control the issue.  There are selections that will let you specify one adapter or another, or let the computer decide which adapter to use.  Change all these selection to Nvidia and not let the software decide.  Again, some online research on how to do this will be helpful.
    • Vivekanandan A
      Subscriber

      Hi Robert,

      Thank you  for the suggestions.

      I tried out your recommendations.

      Still I am facing the issue.

    • Sampat Kumar
      Ansys Employee
      Hi All, 
      Yes, Sometimes the user has disabled the intel driver and tried with the Nvidia and solved the issues. there are users who updated the driver to the current version and rolled it out to the just previous version which has solved the issues. 

      There is also a workaround for it, "Double-clicking" on the contour values, typing the values, and hitting "Enter" from the keyboard, but it would appear that this can't be editable, even though, after double click on the number and enter the value then pressing enter will edit your number.  Let me know if it worked or not. 

      Regards,
      Sampat



       

    • Vivekanandan A
      Subscriber

      Dear Ansys users,

      The issue is resolved for me by disabling one of the display adapters (intel or nvidia). Now I am working with intel disabled.

      But I feel this is not the complete solution. The software should be able to chose the requried adapter itself. I will update after discussion with the Ansys team on this issue. 

      Thank you. 

      Thanks for your suggestins Sampath!

      • Sampat Kumar
        Ansys Employee

        Hi Vivekanandan,
        Yes, you are right. I don't suggest the user disabled the driver if you face any issues with it. 
        the other Workaround that I have given will work for you. Double-click on the number and then enter the value and then press enter then it will change the value. the difference is only you will not be able to see the mouse cursor and number when you double-click on the number and enter the value. 

        Regards,
        Sampat

    • Vivekanandan A
      Subscriber

      Thank you Sampat. What you told works for me now! 

      The only thing is that, it is not user friendly as it deceives the user. Your team can consider this for improvement. 

    • Sampat Kumar
      Ansys Employee

      Hi All, 
      This was the bug and it is resolved in the 2023R2. 
      Edit the system environment variables in the search window of your system, then click environment variable, select a new user variable in the user variable, type the variable name ANS_USE_OPENGL_LEGEND_EDIT, and set the variable value =1 Then apply this setting in the system.
      I would recommend to restart the system and then open it. You will be able to edit it on your system. 

      I have provided the workaround above that can also help you 
      workaround- "Double click on the number and enter the number, Although you will not be able to see the mouse cursor and the number when you enter, even after entering the number, press the Enter button, and you can see the number change. If this is not working, then try to do right-click on the number and click on Edit, then enter the number, then press the Enter button from the keyword, and the value will change."

      Regards, 
      Sampat

      • Scott Young
        Subscriber

         

        This issue was NOT resolved in 2023 R2.  I have upgraded and opened up a database with results in 2023 R2 and the problem was still present.

        The workaround that that was mentioned previously about double clicking, typing the number, and hitting Enter does work.

        Also, the environment variable that you mentioned also mostly works but ONLY for 2023R2.  It does not work for 2022R2.  I do not ever see a cursor but The font color of the numbers changes from black to grey and when you type numbers, they indeed display as you type.  As I type numbers in 2023 with this approach, the model rotates as well and the keyboard number pad behaves as if numlock is off while typing numbers for the legend.

         

    • Brian Jones
      Subscriber

      None of the suggested workarounds work for 2022 R2.  Are there any other suggestions?  It seems like I should uncheck 'Automatic value' but that option is greyed out.

       

      • Brian Jones
        Subscriber

        Update: apparently the 'max' value is uneditable, but the *second* highest value is editable, see image.

         

        • Sampat Kumar
          Ansys Employee

          Hi Brian,
          Please follow the following link to change the max and minimum value

          /forum/forums/topic/changing-scalar-range/#:~:text=Ansys%20Employee-,If%20you%20uncheck%20Max%2C%20Min%20on%20Color%20Bar%2C%20you%20can,cannot%20increase%20the%20minimum%20value.

          Regards,
          Sampat

    • Sampat Kumar
      Ansys Employee

      Hi Brian,
      I am able to edit the maximum value. I would recommend right click and then enter the value if double click doesn’t work. I have explained the solution above and it worked for everyone. You can reset your Ansys to see if it workes for you or not. 

      Regards, 
      Sampat

       

    • andrew.ward1
      Subscriber

      Sampat,

      I'm having the same issue as Brian. Your workaround always works for the second highest value in the ledgend but does not consistently work for the max value. When trying to edit the max value, I've noticed that your workaround only works if I enter a value greater than the existing max value. A very similar behavior occurs when trying to edit the min value.

      I apologize if it's naive to try to edit the min/max values in Ansys. I'm currently trying to learn Ansys (Fresh/new Ansys install < 2 months ago). I do not know the proper "functioning" of the legend (Partly due to the legend always functioning improperly). In past experience with other software, I've found it beneficial to scale the legend such that the maximum and minimum values are outside of the legend.

      Thanks,

      Andrew

      • Sampat Kumar
        Ansys Employee

        Hi Andrew,
        If you uncheck Max, Min on Color Bar, you can set the highest value to a value larger than the maximum and the lowest value on the legend to a value smaller than the smallest to get consistent numbers on every plot, but you can not decrease the max value, and cannot increase the minimum value. 

        Please follow the following link that might be helpful for your queries. 
        I appreciate that you are using Ansys and please feel free to post questions here, will try to help you as soon as possible. 

        /forum/forums/topic/changing-scalar-range/#:~:text=Ansys%20Employee-,If%20you%20uncheck%20Max%2C%20Min%20on%20Color%20Bar%2C%20you%20can,cannot%20increase%20the%20minimum%20value.
        Regards,
        Sampat

Viewing 21 reply threads
  • The topic ‘Unable to edit Mechanical Contour Legend’ is closed to new replies.