Introduction

Navigation:  Toolboxes > Scripting Toolbox >

Introduction

Previous pageReturn to chapter overviewNext page

20-sim scripting allows you to run tasks in 20-sim automatically using scripts running in Python or other scripting tools. With these scripts you can open models, run simulations, change parameters, store results and much more.

Scripts

20-sim session automated by a script in Octave, Matlab or Python.

20-sim provides a set of script functions for numerical computation environments like Octave and Matlab and for the Python programming language. The 20-sim scripting functions are based on XML-RPC calls, so any other programming language with support for XML-RPC can be used to automate various 20-sim steps. In this chapter you will learn how to run basic scripts and make scripts on your own.

 

The next sections explain:

 

Installation for scripting:
o20-sim: enabling the XML-RPC scripting interface in 20-sim
oOctave: installing Octave as scripting environment
oMatlab: installing Matlab as scripting environment
oPython: installing Python as scripting environment
Prepare Scripting Folder: extract the 20-sim scripting functions and documentation to your work directory.
Basic Script: run your first script and see how a basic script is made in Octave/Matlab or Python.
Advanced Scripts: see how you can expand the basic script to perform more advanced tasks in Octave/Matlab.
Writing your own Scripts: How to write your own scripts in Octave/Matlab or Python.

Note: Scripting is not supported in the 20-sim Viewer/Demonstration Version. If you would like to try the scripting functionality, you will need licensed 20-sim version or a trial license.