Set solve process settings and RSM queue through scripting

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

How can I create a new solve process setting and select the RSM queue through scripting?

Tagged:

Answers

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

    To get the available RSM queues, you can use:

    available_rsm_queues = ExtAPI.Application.RSMQueues
    

    To define a new solve process setting configuration, you can use the following code:

    collection = ExtAPI.Application.SolveConfigurations
    config = Ansys.ACT.Mechanical.Application.SolveProcessSettings.SolveConfiguration()
    config.Name = 'Test'
    config.Settings.License = 'Ansys Mechanical Enterprise'
    config.SolveProcessSettings.MaxNumberOfCores = 8
    config.SolveProcessSettings.LicenseQueuing = True
    config.Settings.Name = 'Local'
    collection.Add(config)