<div dir="ltr"><div>Simon,<br><br></div>Selecting the reader in the pipeline browser and calling GetActiveSource() in the python shell should return a reference to the reader.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Apr 18, 2014 at 11:39 AM, Su, Simon M CTR USAF (US) <span dir="ltr"><<a href="mailto:simon.m.su.ctr@mail.mil" target="_blank">simon.m.su.ctr@mail.mil</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hello,<br>
<br>
<a href="http://paraview.org/Wiki/ParaView/Python_Scripting" target="_blank">http://paraview.org/Wiki/ParaView/Python_Scripting</a> has the example on how to list the variables in a dataset.
<br>
<br>
=============<br>
<div dir="ltr" style="text-align:left">
<div>
<pre><span>>>></span> reader = ExodusIIReader<span>(</span>FileName=<span>'.../can.ex2'</span><span>)</span>
<span># These variables are currently selected</span>
<span>>>></span> reader.<span>PointVariables</span>
<span>[</span><span>'DISPL'</span>, <span>'VEL'</span>, <span>'ACCL'</span><span>]</span>
<span># These are available in the file</span>
<span>>>></span> reader.<span>PointVariables</span>.<span>Available</span>
<span>[</span><span>'DISPL'</span>, <span>'VEL'</span>, <span>'ACCL'</span><span>]</span>
<span># Enable the DISPL array only</span>
<span>>>></span> reader.<span>PointVariables</span> = <span>[</span><span>'DISPL'</span><span>]</span>
<span># Force read</span>
<span>>>></span> reader.<span>UpdatePipeline</span><span>(</span><span>)</span>
<span># Now check the output. Note: GlobalNodeId is generated automatically by the reader.</span>
<span>>>></span> reader.<span>PointData</span><span>[</span>:<span>]</span>
<span>[</span>Array: GlobalNodeId, Array: PedigreeNodeId, Array: DISPL<span>]<br>====================<br></span></pre>
</div>
</div>
<br>
If I am doing this in ParaView GUI and I load the can.ex2 data manually and then use Tools->Python Shell to get to python, how do I get a list of the variable? Who would be the parent of PointVariables.Available? <????>.PointVariables.Available ?<br>
<br>
thanks<span class="HOEnZb"><font color="#888888"><br>
-simon<br>
<br>
<br>
</font></span></div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Casey B. Goodlett, Ph.D.<br>Technical Leader<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
(919) 969-6990 x310</div>
</div>