How to fill the worksheet for Fatigue Combination?

Options
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: 13
    Name Dropper First Comment Photogenic
    Options

    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: 218
    First Answer First Comment 5 Likes First Anniversary
    Options

    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.