How can I set Independent Bands on Legends in Mechanical?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 416
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How can I set Independent Bands on Legends in Mechanical?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 416
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    Options

    I couldn't find a direct function but an alternative can be to just set the colors of the first and the last legend color band to the default ones we get via Mechanical GUI. Used the UInt32 Number for the colors:

    legend_setting.SetBandColor(legend_setting.NumberOfBands - 1, 16724940)
    legend_setting.SetBandColor(0, 6723993)
    

    If anyone has a better method, please share.