1 year ago

#231236

test-img

tracer

Questions about VISSIM COM interface GetQueued method

I'm using Python to communicate with the VISSIM traffic simulation software using its COM interface. I'm trying to access the GetQueued information of one of my link while running a simulation.

import win32com.client as com
vissim_com = com.Dispatch("Vissim.Vissim")
Sim = vissim_com.Simulation
vissim_com.LoadNet(r'D:\Tracer\labprogramme\vissim\test.inp)
vnet = vissim_com.net
links = vnet.Links
link1 = links.GetLinkByNUmber(1)
Sim.Period = 3600
for i in range(3600):
    Sim.RunSingleStep()
    cars = link1.GetVehicles()
    queued_cars = cars.GetQueued()

The last line returns an error

pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, 'Not implemented method called.', 'VISSIMCOM.HLP', 131200, -2147467259), None)

I have no idea for this question, is there anything wrong with my code?

python

com-interface

ptv-vissim

0 Answers

Your Answer

Accepted video resources