How to switch on or off Distributed for Foreground solve via Mechanical scripting?

Rohith Patchigolla
Rohith Patchigolla Member, Moderator, Employee Posts: 212
100 Comments 25 Answers Second Anniversary 25 Likes
✭✭✭✭

How to switch on or off Distributed for Foreground solve via Mechanical scripting?

Answers

  • Rohith Patchigolla
    Rohith Patchigolla Member, Moderator, Employee Posts: 212
    100 Comments 25 Answers Second Anniversary 25 Likes
    ✭✭✭✭

    The below commands will help. Please note that, the GUI will not show the changes (for example, if you turn on Distributed, the check box is not yet seen in the GUI. But, if you go to Solver Process Settings and come back to Mechanical, it is updated). You can change this for other queues, by providing the queue name in place of "My Computer"

    config =  ExtAPI.Application.SolveConfigurations["My Computer"]
    sp = config.SolveProcessSettings
    sp.DistributeSolution = True
    #sp.DistributeSolution = False