Using Python as the script language

A distinguishing feature of Python is its clear and understandable syntax. With this you can conveniently set up a prompt which is tailored to your project.

Python and all of the additional libraries are open source programs without usage restrictions.

Notes:  

  • You must install Python 2.7 or a higher version and the appropriate extension PythonWin, which provides Python with the COM functionality.
  • Python 2.7 and the appropriate extension PythonWin must correspond to your Vissim version, e.g. python-2.7.6.amd64.msi and pywin32-218.win-amd64-py2.7.exe for the 64-bit edition of Vissim.
  • wxPython is not supported.
Example of a *.pys script file
all_flows = Vissim.Net.VehicleInputs.GetAll()
for i in range(len(all_flows)):
all_flows[i].SetAttValue("Volume(1)", 0.5 * all_flows[i].AttValue("Volume(1)"))

Superordinate topic:

Using the COM Interface