[python-win32] Setting the value of an array of clusters in LabVIEW from python

Geller, Shawn (Assoc) shawn.geller at nist.gov
Mon Apr 11 13:59:14 EDT 2016


P.S. In fact, even if I do:


cv = output_vi.getcontrolvalue('Array of Cluster')


after manually putting something into the array of clusters, and immediately saying


output_vi.setcontrolvalue('Array of Cluster', cv)


I get an empty cluster on the front panel of my VI.


________________________________
From: Geller, Shawn (Assoc)
Sent: Monday, April 11, 2016 11:25 AM
To: python-win32 at python.org
Subject: Setting the value of an array of clusters in LabVIEW from python


Hi there.


I've been able to use the COM client to set the value of a cluster, and I've been able to set the value of an array, both using the "setcontrolvalue" method, but I've been unable to set the value of an array of clusters. How do I do this? Here's some example code:


import win32com.client



output_vi = LabVIEW.GetVIReference("C:\\Geller\\LabVIEW_code\\output.vi")

output_vi.setcontrolvalue('Cluster', (1,2.0,2.0)) # This is able to set the value of a cluster


output_vi.setcontrolvalue('Array',(1,1,2,3,5,8,13,21)) # This is able to set the value of an array
output_vi.setcontrolvalue('Array of Cluster',((1,1.0,1.2),(3,2.0,2.2))) # But this fails


Can you help me out here?

Thanks,
Shawn



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20160411/17d1dcb5/attachment-0001.html>


More information about the python-win32 mailing list