Cameo Simulation Toolkit Magic Model Analyst includes several scripting languages out of the box :
- BeanShell
- Built-in Math
- GroovyJavaScript Nashorn (deprecated)
- JavaScript Rhino (default)
- Python (Jython): you can call an external Python library (*.py), e.g., from lib1 import fc1, fc2, in two ways:
- Use import sys and sys.path commands to get the working directory of Python. Then copy the *.py file to the returned directory prior to calling the library.
Use import sys and sys.path.append(pathOfFile) prior to calling the library.
Code Block language text import sys sys.path.append(pathOfFile) // e.g. "C:\Python\Test" from lib1 import fc1, fc2
...