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

Member, Employee Posts: 385
25 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭

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

Tagged:

Answers

  • Member, Employee Posts: 385
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited September 2024

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

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

Welcome!

It looks like you're new here. Sign in or register to get started.