How to create results and group them in Mechanical

Options
Erik Kostson
Erik Kostson Member, Employee Posts: 164
First Comment First Answer Name Dropper First Anniversary
edited December 2023 in Structures

How can I with mechanical scripting add say stress and displacement results into a folder group?

Best Answer

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 164
    First Comment First Answer Name Dropper First Anniversary
    Answer ✓
    Options

    Below is a sample script that does that:

    resgr=[]
    
    solution = ExtAPI.DataModel.Project.Model.Analyses[0].Solution
    directional_deformation = solution.AddDirectionalDeformation()
    
    equivalent_stress = solution.AddEquivalentStress()
    
    resgr.append(equivalent_stress)
    resgr.append(directional_deformation)
    
    
    folder1 = ExtAPI.DataModel.Tree.Group(resgr)
    folder1.Name = "My folder"
    
This discussion has been closed.