How to fill the worksheet for Fatigue Combination?

smrahma
smrahma Member, Employee Posts: 1
Ansys Employee First Anniversary
✭✭✭

Hi, I am writing a script for Fatigue combination with inputs from three Random Vibration analysis. I am trying to add Environment Name and Fatigue tool in Fatigue Combination worksheet. Scripts can add load case (row in WorkSheet), But don't see any script option to add data to load cases. Any scripting help is welcome.

Comments

  • Jimmy He
    Jimmy He Member, Employee Posts: 19
    First Anniversary 10 Comments Photogenic Name Dropper
    ✭✭✭

    Hi Syed,

    This can be accomplished with the following script:

    `

    tool = DataModel.GetObjectsByName('Fatigue Combination')[0]
    my_analysis = DataModel.AnalysisList[0]
    my_fatigue_tool = DataModel.GetObjectsByName('Fatigue Tool')[0]
    
    # Get internal object
    io = tool.InternalObject
    # Add load case
    io.AddLoadCase()
    # Set analysis ID
    io.EnvironmentId[0]=my_analysis.Id
    # Set fatigue tool ID
    io.ToolId[0]=my_fatigue_tool.ObjectId
    # Set scale factor
    io.ScaleFactor[0]=1.
    
    # Refresh
    ExtAPI.DataModel.Tree.Refresh()
    

    `

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 290
    100 Comments 25 Answers 25 Likes Photogenic
    ✭✭✭✭

    Note that this solution relies on undocumented commands, which are outside of any Quality Assurance (QA) programs and may not be forward compatible.

    @sachinverghese and @Pierre Thieffry , please consider adding a supported method for this.