PTV Visum - Frequently Asked Questions (FAQs)

(#VIS22153)

How to execute a PrT shortest path search by COM?

An example for a shortest path search between two nodes:

Set NetElementContainer = Visum.CreateNetElements
Set Node = Visum.Net.Nodes.ItemByKey(10)
NetElementContainer.Add Node
Set Node = Visum.Net.Nodes.ItemByKey(40)
NetElementContainer.Add Node
'Route search with current speed tCur
Set RouteSearchPrT = Visum.Analysis.RouteSearchPrT
RouteSearchPrT.Clear
VSysCode = 'C'
RouteSearchPrT.Execute NetElementContainer, VSysCode, 1

A more complex example, displaying the result into a list and write the path legs to an attribute file:

http://vision-traffic.ptvgroup.com/faq-files/PTV_ExampleShortestPathSearch.zip