How can add certain results and group them

Erik Kostson
Erik Kostson Member, Employee Posts: 209
50 Answers 100 Comments Photogenic 5 Likes
✭✭✭✭

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: 209
    50 Answers 100 Comments Photogenic 5 Likes
    ✭✭✭✭
    Answer ✓

    Below is a sample code:

    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"