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)