05-22-2008 01:57 AM
05-22-2008 01:59 AM
05-22-2008 03:36 AM
Dear baesi,
Could you please attach that pythonwin also please....
Thanks,
Mathan
05-22-2008 03:43 AM
05-22-2008 05:12 AM
04-17-2013 10:28 PM
Hello,
Thanks for the post. But I have noticed one problem.
The examples posted by you works fine.
But, when you add the Labview file under a project then it doesn't.
I mean, add your Python.vi under one project and then try to run it, it doesn't work. It is not showing any update from python script.
What I think is - we need different dispatch method for calling a VI under a project.
(Dispatch(LabVIEW.Application) will create a reference for an application. If you want to refer to a VI which is under one project then it might need different referencing method)
If you know the solution please post the answer and if you are not clear about the question then I will be happy to post elaborated question.
11-09-2015 03:00 PM - edited 11-09-2015 03:02 PM
Does anyone know what this error mean when I run:
Code:
import win32com.client
labview = win32com.client.Dispatch("Labview.Application")
VI = labview.getvireference(r'C:\Test.vi')
VI.OpenFrontPanel()
Error:
Traceback (most recent call last):
File "C:\Test.py", line 4, in <module>
VI.OpenFrontPanel()
TypeError: 'NoneType' object is not callable
11-09-2015 07:17 PM
05-10-2018 08:41 AM - edited 05-10-2018 08:44 AM
One thing I don't understand:
--> c:\temp\labview.py
--> c:\temp\python.exe
--> c:\temp\python.vi
Where are these files coming from? Ok I have my python file and my .vi file, I understand that. But where are python.exe, python.bld and python.tlb files coming from? I probably need them, because I cannot compile my own .py file. I can compile your example though.. So something is missing.
05-11-2018 04:14 AM
I managed to compile my .py file. I don't need any of these .exe and other files, only the .vi and the .py. Adjusted the path according to that, and it worked just fine!