How do I execute Python commands in Mechanical using JavaScript?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 457
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
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: 457
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    Using ExecutePythonCommand

    Example:

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