vissim com with python interface

643 Views Asked by At

I am using vissim com and trying to integrate python. After I load, the simulation in vissim starts. But when I add a link and give other commands GetMultiAttValues etc (last 3 commands of code given ), it doesn't change anything and does not give the data of the command ( doesn't add links or give details). My code is here given below.

Vissim = com.Dispatch("Vissim.Vissim")
file="D:\Simulation\MLK2.1rough.inpx"
Vissim.LoadNet(file)
Vissim.Simulation.RunContinuous()
k=Vissim.Net.Links
Vissim.Net.Links.AddLink(42, 'LineString(0 30, 200 200)', [3.5, 3.5])
print(k.GetMultiAttValues('Name'))
print(Vissim.Net.Links.ItemBykey(1).AttValue('Length2D'))
0

There are 0 best solutions below