Is there an API for Imported Load objects for scale factor and

Mike.Thompson
Mike.Thompson Member, Employee Posts: 336
25 Answers First Anniversary 100 Comments 25 Likes
✭✭✭✭

Can you modify things like Analysis Time, Scale Factor, Offset for an imported load via API in Mechanical?

Tagged:

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 336
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭
    edited September 18

    See this code as example. Also see it implemented in an example model.

    #Get the load gropu
    ImpLoadGroup=ExtAPI.DataModel.GetObjectsByName('Imported Load (A2) ')[0]
    #Add pressure
    ImpPressure=ImpLoadGroup.AddImportedPressure()
    #Scope it.
    ImpPressure.Location=ExtAPI.DataModel.GetObjectsByName('Face1')[0]
    #Make changes to the data table and update it.
    Table=ImpPressure.GetTableByName("")
    NewRow = Ansys.ACT.Automation.Mechanical.WorksheetRow()
    Table.Add(NewRow)
    NewRow[0]='File1:Pressure1'
    NewRow[1]='2'
    NewRow[2]='1.26'
    Model.Activate()
    ImpPressure.Activate()