How can I define a load by components through scripting?

Options
Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

How can I define a load by components through scripting?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

    Below is an example:

        analysis=ExtAPI.DataModel.Project.Model.Analyses[0] # refer to analysis
        newForce=analysis.AddForce() # add force
        newForce.DefineBy = LoadDefineBy.Components # define by components
        newForce.ZComponent.Output.DiscreteValues = [Quantity("1 [N]")] # define Z value
        newForce.YComponent.Output.DiscreteValues = [Quantity("1 [N]")] # define Y value