How to fill the worksheet for Fatigue Combination?

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

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: 24
    10 Comments 5 Likes First Answer First Anniversary
    ✭✭✭✭

    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, GitHub-issue-creator Posts: 315
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    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.

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 275
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited November 1

    Same would be good to have for the solution combination tool (say AddLoadCase() or the property NumLoadCombos that are also currently Internal objects).