<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>P.S. In fact, even if I do:</p>
<p><br>
</p>
<p>cv = output_vi.getcontrolvalue('Array of Cluster')</p>
<p><br>
</p>
<p>after manually putting something into the array of clusters, and immediately saying</p>
<p><br>
</p>
<p>output_vi.setcontrolvalue('Array of Cluster', cv)</p>
<p><br>
</p>
<p>I get an empty cluster on the front panel of my VI.</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Geller, Shawn (Assoc)<br>
<b>Sent:</b> Monday, April 11, 2016 11:25 AM<br>
<b>To:</b> python-win32@python.org<br>
<b>Subject:</b> Setting the value of an array of clusters in LabVIEW from python</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi there.</p>
<p><br>
</p>
<p>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:</p>
<p><br>
</p>
<p><span>import win32com.client</span><br>
</p>
<p><br>
</p>
<p><span><br>
</span></p>
<p></p>
<pre style="font-family:'Courier New'; font-size:9pt"><span style="background-color:#ffe4ff"></span></pre>
<span style="font-family:Calibri,Arial,Helvetica,sans-serif,'Apple Color Emoji','Segoe UI Emoji',NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size:16px; background-color:rgb(255,255,255)">output_vi = LabVIEW.GetVIReference("C:\\Geller\\LabVIEW_code\\output.vi")</span><br>
<p></p>
<p><span>output_vi.setcontrolvalue('Cluster', (1,2.0,2.0)) # This is able to set the value of a cluster</span><br>
</p>
<p><span><br>
</span></p>
<p></p>
<div>output_vi.setcontrolvalue('Array',(1,1,2,3,5,8,13,21)) # This is able to set the value of an array<br>
</div>
<div><span>output_vi.setcontrolvalue('Array of Cluster',((1,1.0,1.2),(3,2.0,2.2))) # But this fails</span><br>
</div>
<div><span><br>
</span></div>
<div><span><br>
</span></div>
<div><span>Can you help me out here?</span></div>
<div><span><br>
</span></div>
<div><span>Thanks,</span></div>
<div><span>Shawn</span></div>
<br>
<p></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
</div>
</div>
</div>
</div>
</body>
</html>