good afternoon; i have tried of follow your instructions, however an error appears. For example in the minute 8:00 on python i wrote: Vissim.Net.Links ; but appear this error: Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 466, in __getattr__ return self._ApplyTypes_(*args) File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 459, in _ApplyTypes_ self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args), com_error: (-2147023174, 'El servidor RPC no est\xe1 disponible.', None, None)
Hello Jochen. I use python to interface with Vissim COM, i can open the vissim, load road network and change network file position, but when I want to add the new links to network, there is something wrong, I can't call the net object, How can I resolve it?
Hi, can you execute the example in C:\Users\Public\Documents\PTV Vision\PTV Vissim 11\Examples Training\COM\Network Objects Adding? If not, please contact our technical support.
I face the same problem? any solution? there is an error in SetAttValue as well ... Undefined function or variable 'SetAttValue'. I am able to execute the example but it will close very fast after creating some links... Any solutions ??
Thank for your information. I run Vissim = com.Dispatch("Vissim.Vissim") script but It showed this error : IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147221005, 'Invalid class string', None, None) I checked it in student version and vissim 8 but it didn't work!
Thank you for good information. I'll give you one question Is there a way to save VISUM Assignment analysis results (database, JPG, PDF ...) to an external server?
That should be possible in Visum. Please post the Visum related questions in the PTV Visum forum: www.linkedin.com/groups/2230651/. If it is PTV Vissim related, use the PTV Vissim forum: www.linkedin.com/groups/2524087/
Hi, I am using Python 2.7 in anaconda with Visum 14.0. I have 2 questions: first, how can I open auto completion with "Tab" like it used to be in Matlab and in your video. Second, when I tried Visum.Net.Links, it says "com_error: member not found". Same error when I tried Visum.Net.Links(). Hope for your reply. Thank you.
I think you need to generate the cache in Python to get auto-completion. Use Vissim = com.gencache.EnsureDispatch("Vissim.Vissim") to generate the cache. In PTV Visum 18, there is auto completion in the Python Console (Script > Python Console)
Hello, I hava a small issue while working in Vissim 2020 COM interface in Python. When the Python code is run, the Vissim file loads, completes all the commands, provides an output and closes immediately. The file does not stay open. How do I resolve it?
Hi Naveen, here's what our experts say: there is an example on how to use the COM interface to generate splines based on points in the training directory of your Vissim installation. Please check ...\Examples Training\COM\Network Objects Adding\Network Objects Adding.py What you also can do is access the directory through the "Help" tab in Vissim by selecting "Examples" -> "Open Training Directory". The file shows how to add links, using the "AddLink()" function and how to add connectors, using the "AddConnector()" function. Both are based on a string input of points to define the geometry of the spline (and other values). With RecalculateSpline() you can recompute the spline of a existing connector or link, if you wish. Hope that helps, Your PTV Social Media Team
good afternoon; i have tried of follow your instructions, however an error appears. For example in the minute 8:00 on python i wrote: Vissim.Net.Links ; but appear this error:
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 466, in __getattr__
return self._ApplyTypes_(*args)
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 459, in _ApplyTypes_
self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args),
com_error: (-2147023174, 'El servidor RPC no est\xe1 disponible.', None, None)
Great video. The only suggestion is if it could have better resolution.
Great video!
Hello Jochen. I use python to interface with Vissim COM, i can open the vissim, load road network and change network file position, but when I want to add the new links to network, there is something wrong, I can't call the net object, How can I resolve it?
Hi, can you execute the example in C:\Users\Public\Documents\PTV Vision\PTV Vissim 11\Examples Training\COM\Network Objects Adding? If not, please contact our technical support.
I face the same problem? any solution? there is an error in SetAttValue as well ... Undefined function or variable 'SetAttValue'.
I am able to execute the example but it will close very fast after creating some links...
Any solutions ??
Is the COM interface still supported in Vistro 2025?
How to enable this auto-complete command in python interpretor. At @8.51 I can see autosuggestion to complete command.
Travel time: ~27:00
what about?
@@aliabdal-khaliq3331 It was a note to self.
@@NoName-et2lz Oh OK, it was a very organized desktop hahaha
Thank for your information.
I run Vissim = com.Dispatch("Vissim.Vissim")
script but It showed this error :
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
I checked it in student version and vissim 8 but it didn't work!
I use vissim student version and com interface is not activated ,what should i do to activate it ?
student version is not integrated with the function....
If you are a graduated student, ask PTV Group about a thesis version. It's less limited than the student version.
Thank you for good information.
I'll give you one question
Is there a way to save VISUM Assignment analysis results (database, JPG, PDF ...) to an external server?
That should be possible in Visum. Please post the Visum related questions in the PTV Visum forum: www.linkedin.com/groups/2230651/. If it is PTV Vissim related, use the PTV Vissim forum: www.linkedin.com/groups/2524087/
Hi, I am using Python 2.7 in anaconda with Visum 14.0. I have 2 questions: first, how can I open auto completion with "Tab" like it used to be in Matlab and in your video. Second, when I tried Visum.Net.Links, it says "com_error: member not found". Same error when I tried Visum.Net.Links(). Hope for your reply. Thank you.
I have same questions.Anybody can reply?
I think you need to generate the cache in Python to get auto-completion. Use Vissim = com.gencache.EnsureDispatch("Vissim.Vissim") to generate the cache. In PTV Visum 18, there is auto completion in the Python Console (Script > Python Console)
Hello, I hava a small issue while working in Vissim 2020 COM interface in Python. When the Python code is run, the Vissim file loads, completes all the commands, provides an output and closes immediately. The file does not stay open. How do I resolve it?
Maybe you use the Vissim variable inside of a function. If you don't return the Vissim variable from the function, Python will close.
How to generate spline using COM interface?
Hi Naveen, here's what our experts say: there is an example on how to use the COM interface to generate splines based on points in the training directory of your Vissim installation. Please check ...\Examples Training\COM\Network Objects Adding\Network Objects Adding.py
What you also can do is access the directory through the "Help" tab in Vissim by selecting "Examples" -> "Open Training Directory". The file shows how to add links, using the "AddLink()" function and how to add connectors, using the "AddConnector()" function. Both are based on a string input of points to define the geometry of the spline (and other values). With RecalculateSpline() you can recompute the spline of a existing connector or link, if you wish.
Hope that helps,
Your PTV Social Media Team
VERY GREAT EXPLANATION!
how do I open Matlab script?
Thanks!