From Zsolt.Kalozi at eli-alps.hu Thu May 9 07:53:16 2019 From: Zsolt.Kalozi at eli-alps.hu (=?iso-8859-2?Q?K=E1l=F3zi_Zsolt?=) Date: Thu, 9 May 2019 11:53:16 +0000 Subject: [python-win32] getvireference issue Message-ID: <1557402796955.83840@eli-alps.hu> Dear all! I'm writing this mail by hoping someone could help. I have pywin32-224 installed on my computer. The following code doesn't seem to work: import win32com.client labview = win32com.client.Dispatch("LabView.Application") VI = labview.getvireference(r'Controller.vi') I get the following error: AttributeError: '' object has no attribute 'getvireference' I don't know why it stopped working, it worked before. Maybe I had build 222 or 223 before. ? Regards, Zsolt ________________________________ A jelen email ?tj?n megk?ld?tt v?lem?ny vagy inform?ci? kiz?r?lag a k?ld? szem?ly?hez kapcsol?dik ?s nem felt?tlen?l jelen?ti meg az ELI-HU Nonprofit Kft. ?ll?spontj?t is. T?rsas?gunk nem v?llal felel?ss?get az email tartalm??rt, ide ?rtve k?l?n?sen, de nem kiz?r?lagosan k?telezetts?gv?llal?st jogi k?t? er?vel b?r? szerz?d?sek l?trehoz?s??rt, m?dos?t?s??rt vagy megsz?ntet?s??rt, valamint az ?tadott inform?ci? alapj?n indult elj?r?sok?rt mindaddig, am?g az adott inform?ci?t ut?lag ?s ?r?sban a megfelel?en meghatalmazott vagy az ELI-HU Nonprofit Kft. k?pviseleti jog?val felruh?zott szem?ly meg nem er?s?ti. Az email bizalmas vagy jogilag v?dett inform?ci?t tartalmazhat, amelyet kiz?r?lag a c?mzett szem?ly vagy szervezet, illetve az ?ltaluk felhatalmazottak haszn?lhatnak fel. Amennyiben ?n nem az ?zenet c?mzettje, k?rj?k, ?rtes?tse err?l az ?zenet k?ld?j?t ?s t?r?lje az ?zenetet rendszer?b?l. A jelen email tartalm?nak nem a c?mzett ?ltali b?rmilyen form?ban t?rt?n? illet?ktelen k?zz?t?tele, terjeszt?se, m?sol?sa, illetve felhaszn?l?sa vagy alkalmaz?sa szigor?an tilos ?s jogszab?lyba ?tk?zhet. Please note that any information or opinions presented in this email are solely those of the sender and do not necessarily represent those of ELI-HU Nonprofit Ltd. Our Company accepts no liability or responsibility for the content of this email, especially, but not limited to commitment for establishing, modifying or terminating legally binding contracts, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing by a person duly authorized or endowed with the right of representation of ELI-HU Nonprofit Ltd. This email may contain confidential or legally protected information, and is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient of this email, please inform the sender immediately and delete it from your system. Any unauthorized disclosure, dissemination, copying or use of or reliance upon the content of this email by anyone other than the intended recipient is strictly prohibited and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Fri May 10 00:33:01 2019 From: timr at probo.com (Tim Roberts) Date: Thu, 9 May 2019 21:33:01 -0700 Subject: [python-win32] getvireference issue In-Reply-To: <1557402796955.83840@eli-alps.hu> References: <1557402796955.83840@eli-alps.hu> Message-ID: On May 9, 2019, at 4:53 AM, K?l?zi Zsolt wrote: > > I'm writing this mail by hoping someone could help. I have pywin32-224 installed on my computer. > The following code doesn't seem to work: > import win32com.client > > labview = win32com.client.Dispatch("LabView.Application") > VI = labview.getvireference(r'Controller.vi') > I get the following error: > > AttributeError: '' object has no attribute 'getvireference' The actual spelling is GetVIReference. Does that work? ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Zsolt.Kalozi at eli-alps.hu Fri May 10 02:50:43 2019 From: Zsolt.Kalozi at eli-alps.hu (=?iso-8859-2?Q?K=E1l=F3zi_Zsolt?=) Date: Fri, 10 May 2019 06:50:43 +0000 Subject: [python-win32] connecting to labview executable Message-ID: <1557471042807.65761@eli-alps.hu> Dear all, Please set aside my last mail, when I asked about 'getvireference', I reinstalled python and somehow that solved the problem. Now I can connect to the running .VI file and read out it's value? with the following simple snippet: labview = win32com.client.Dispatch("Labview.Application") VI = labview.getvireference(r'path_to_my.vi') while True: print(VI.getcontrolvalue('power') So this continously reads out the value from the frontpanel of the .vi, that is called 'power'. Unfortunatelly this only works if the .VI is running in the LabView IDE. That is okay for the test environment but not okay in the real environment. I will have an .EXE file that was generated from the .VI, so I need to access that one. How can I do that with this library? Because simply changing the path to the executable path doesn't work. Under 'advanced' I also tried to enable and give a name to the ActiveX server, when I generate the executable, and give that name to the Dispatch, but that didn't work either. I would deeply appreciate if someone could help me with that! Regards, Zsolt K?l?zi ________________________________ A jelen email ?tj?n megk?ld?tt v?lem?ny vagy inform?ci? kiz?r?lag a k?ld? szem?ly?hez kapcsol?dik ?s nem felt?tlen?l jelen?ti meg az ELI-HU Nonprofit Kft. ?ll?spontj?t is. T?rsas?gunk nem v?llal felel?ss?get az email tartalm??rt, ide ?rtve k?l?n?sen, de nem kiz?r?lagosan k?telezetts?gv?llal?st jogi k?t? er?vel b?r? szerz?d?sek l?trehoz?s??rt, m?dos?t?s??rt vagy megsz?ntet?s??rt, valamint az ?tadott inform?ci? alapj?n indult elj?r?sok?rt mindaddig, am?g az adott inform?ci?t ut?lag ?s ?r?sban a megfelel?en meghatalmazott vagy az ELI-HU Nonprofit Kft. k?pviseleti jog?val felruh?zott szem?ly meg nem er?s?ti. Az email bizalmas vagy jogilag v?dett inform?ci?t tartalmazhat, amelyet kiz?r?lag a c?mzett szem?ly vagy szervezet, illetve az ?ltaluk felhatalmazottak haszn?lhatnak fel. Amennyiben ?n nem az ?zenet c?mzettje, k?rj?k, ?rtes?tse err?l az ?zenet k?ld?j?t ?s t?r?lje az ?zenetet rendszer?b?l. A jelen email tartalm?nak nem a c?mzett ?ltali b?rmilyen form?ban t?rt?n? illet?ktelen k?zz?t?tele, terjeszt?se, m?sol?sa, illetve felhaszn?l?sa vagy alkalmaz?sa szigor?an tilos ?s jogszab?lyba ?tk?zhet. Please note that any information or opinions presented in this email are solely those of the sender and do not necessarily represent those of ELI-HU Nonprofit Ltd. Our Company accepts no liability or responsibility for the content of this email, especially, but not limited to commitment for establishing, modifying or terminating legally binding contracts, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing by a person duly authorized or endowed with the right of representation of ELI-HU Nonprofit Ltd. This email may contain confidential or legally protected information, and is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient of this email, please inform the sender immediately and delete it from your system. Any unauthorized disclosure, dissemination, copying or use of or reliance upon the content of this email by anyone other than the intended recipient is strictly prohibited and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Sun May 12 02:28:38 2019 From: timr at probo.com (Tim Roberts) Date: Sat, 11 May 2019 23:28:38 -0700 Subject: [python-win32] connecting to labview executable In-Reply-To: <1557471042807.65761@eli-alps.hu> References: <1557471042807.65761@eli-alps.hu> Message-ID: <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> On May 9, 2019, at 11:50 PM, K?l?zi Zsolt wrote: > > So this continously reads out the value from the frontpanel of the .vi, that is called 'power'. > Unfortunatelly this only works if the .VI is running in the LabView IDE. > That is okay for the test environment but not okay in the real environment. > > I will have an .EXE file that was generated from the .VI, so I need to access that one. How can I do that with this library? Because simply changing the path to the executable path doesn't work. > Under 'advanced' I also tried to enable and give a name to the ActiveX server, when I generate the executable, and give that name to the Dispatch, but that didn't work either. I'm trying to interpret what you've said here. Are you saying that the win32com.client.Dispatch statement only connects to LabView if your executable is already running? If so, then all you should have to do is use os.spawn or subprocess.Popen to launch the executable. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3870 bytes Desc: not available URL: From ckkart at hoc.net Sun May 12 15:54:28 2019 From: ckkart at hoc.net (ckkart at hoc.net) Date: Sun, 12 May 2019 16:54:28 -0300 Subject: [python-win32] connecting to labview executable In-Reply-To: <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> References: <1557471042807.65761@eli-alps.hu> <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> Message-ID: Am 12/05/19 um 03:28 schrieb timr at probo.com: > On May 9, 2019, at 11:50 PM, K?l?zi Zsolt > wrote: >> >> So this continously reads out the value from the frontpanel of the >> .vi,?that is called 'power'. >> Unfortunatelly this only works if the .VI is running in the LabView IDE.? >> That is okay for the test environment but not okay in the real >> environment. >> ? >> I will have an .EXE file that was generated from the .VI, so I need >> to?access that one. How can I do that with this?library? Because >> simply changing the path to the executable path doesn't work. >> Under 'advanced'?I also tried to enable and give a name to the ActiveX >> server, when I generate the executable, and give that name to the >> Dispatch, but that didn't work either. > > I'm trying to interpret what you've said here. ?Are you saying that the > win32com.client.Dispatch statement only connects to LabView if your > executable is already running? ?If so, then all you should have to do is > use os.spawn or subprocess.Popen to launch the executable. I think what he is saying that he can connect to the LabView IDE but he cannot connect to the stand-alone executable once it is built. LabView is an interpreter which comes with a compiler to build stand-alone binaries. Anyway, LabView can do socket comunication so I think this is the way do go rather than reading LabView controls via pywin32. Christian From thopiekar at gmail.com Sun May 12 17:38:56 2019 From: thopiekar at gmail.com (Thomas Pietrowski) Date: Sun, 12 May 2019 23:38:56 +0200 Subject: [python-win32] Job: Need help in getting events working with cx_Freeze Message-ID: Dear PyWin32 mailing members! I need help in getting a fully working COM server working with a slicing software called Ultimaker Cura[1 ], which uses cx_Freeze[2 ]. Took my time to write a job proposal the last weeks and tried to make it clear on my website[3 ] what I need. All the info should be there to get an overview of this task, but feel free to ask me any questions you have! That would help to answer last questions in the proposal. Of course, I dropped also a gratuity on this task, so there is some motivation for you to solve the issue. Just to summarize: The main goal is to make Ultimaker Cura a COM server with PyWin32. That is already partly working since I can access variables and functions with my so-called "Interface plugin"[4 ], but I can't exchange any events right now. Ultimaker Cura uses PyQt5 and therefore Qt's signal system already. What I need is a working concept, so we are able to get events on changes in Ultimaker Cura (COM server) sent from emitted Qt signals. Finally, I will try to create an event proxy, which should mirror all Qt signals to COM events. But to make this step I need you before! Any feedback from you is highly appreciated! If you are interested in working in it, please write a separate email regarding this. Thank you all for your attention! - Thomas Karl Pietrowski (aka thopiekar) Website: http://thopiekar.eu ---------------------------------------------------------------------------------- [1] - https://ultimaker.com/en/products/ultimaker-cura-software [2] - https://anthony-tuininga.github.io/cx_Freeze/ [3] - http://thopiekar.eu/other/job-pywin32-cxfreeze-and-events/ [4] - https://thopiekar.eu:5443/cura-cad-integration/CuraInterfacePlugin -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.kristukat at hoc.net Sun May 12 15:53:19 2019 From: c.kristukat at hoc.net (c.kristukat at hoc.net) Date: Sun, 12 May 2019 16:53:19 -0300 Subject: [python-win32] connecting to labview executable In-Reply-To: <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> References: <1557471042807.65761@eli-alps.hu> <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> Message-ID: Am 12/05/19 um 03:28 schrieb timr at probo.com: > On May 9, 2019, at 11:50 PM, K?l?zi Zsolt > wrote: >> >> So this continously reads out the value from the frontpanel of the >> .vi,?that is called 'power'. >> Unfortunatelly this only works if the .VI is running in the LabView IDE.? >> That is okay for the test environment but not okay in the real >> environment. >> ? >> I will have an .EXE file that was generated from the .VI, so I need >> to?access that one. How can I do that with this?library? Because >> simply changing the path to the executable path doesn't work. >> Under 'advanced'?I also tried to enable and give a name to the ActiveX >> server, when I generate the executable, and give that name to the >> Dispatch, but that didn't work either. > > I'm trying to interpret what you've said here. ?Are you saying that the > win32com.client.Dispatch statement only connects to LabView if your > executable is already running? ?If so, then all you should have to do is > use os.spawn or subprocess.Popen to launch the executable. I think what he is saying that he can connect to the LabView IDE but he cannot connect to the stand-alone executable once it is built. LabView is an interpreter which comes with a compiler to build stand-alone binaries. Anyway, LabView can do socket comunication so I think this is the way do go rather than reading LabView controls via pywin32. Christian From timr at probo.com Sun May 12 23:38:40 2019 From: timr at probo.com (Tim Roberts) Date: Sun, 12 May 2019 20:38:40 -0700 Subject: [python-win32] connecting to labview executable In-Reply-To: References: <1557471042807.65761@eli-alps.hu> <4722C002-2885-4DA6-8941-64674C8EA852@probo.com> Message-ID: <430D00EF-54C3-40C3-9E59-1A95AEBD3302@probo.com> On May 12, 2019, at 12:53 PM, c.kristukat at hoc.net wrote: > > I think what he is saying that he can connect to the LabView IDE but he > cannot connect to the stand-alone executable once it is built. LabView > is an interpreter which comes with a compiler to build stand-alone > binaries. Yes, you are right. Do we know whether the standalone executable is SUPPOSED to act as a COM server? Somebody somewhere would have to register it. I would not be surprised at all if that only works with the IDE. That's probably a question for the LabView support forum. > Anyway, LabView can do socket comunication so I think this is the way do > go rather than reading LabView controls via pywin32. Agreed. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3870 bytes Desc: not available URL: