How do I execute Python commands in Mechanical using JavaScript?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 389
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How do I execute Python commands in Mechanical using JavaScript?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 389
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓

    Using ExecutePythonCommand

    Example:

    DS.Script.ExecutePythonCommand("ExtAPI.Log.WriteMessage('Executing Python via JScript')");