NEW RELEASE! The 2022x Refresh2 Hot Fix 3 was released on February 28, 2025. For more information, see 2022x Refresh2 Hot Fix 3 Version News.

It is possible to import custom Python libraries.

To import and use a custom .py file


  1. Create a Lib directory in the <tool_installation_directory>\plugins\com.nomagic.magicdraw.automaton\lib\engines\jython directory.
  2. Add the custom .py file to the Lib directory.
  3. To use the custom .py script, execute the following (e.g. myscript.py is the name of the .py file):

    import myscript
    myscript.calculate(1, 5)

Activity

All
Personal filters
All