I'm writing a program and need to get the following Node results:- ["fuel consumption, Emissions CO, NOx, VOC"] as shown in image. I just need to print these results in Python. My results are visible in VISSIM but can't access them through COM.

enter image description here

I couldn't find any help in PTV Vissim\Training Examples\Basic Commands.

I've tried using multiple codes but It's not working. eg.

  1. Vissim.Net.Nodes.Attvalue('FuelConsumption(Avg,Avg))

  2. Vissim.Net.Node.Movements.ItemBykey(1).AttValue(FuelConsumption(Avg,Avg))

  3. Vissim.Net.Movements.ItemByKey(1).AttValue(FuelConsumption(Avg,Avg))

  4. Vissim.Net.Nodes.Attvalue('EmissionsCO(Avg,Avg)) etc.

I have used COM HELP to write the above syntax but it's giving an error. I don't want user defined emissions. In Vissim, if you go to evaluation\Results List\Node Results: A list opens which gives by default values of Emissions and fuel consumption. I just need to print those values in EXCEL using PYTHON.

1

There are 1 best solutions below

0
On

How about saving the result after simulation, close Vissim and then read .att file? I do this job with Ling Segment Results and Node Results.

Here is my simple code: (Python3.7, Vissim 2020)

network_filename, _extention = datainfo['vissim_inpx'].split('.')

node_result = f'{network_filename}_Node Results_001.att'
cal.extract_from_node(node_result)

You have to click 'Autosave after simulation' button in advance to successfully get 'Node Results_001.att'.

Hope this helps.