<div dir="ltr"><div><div><div>Hi,<br><br>Besides Yoshimi's way, you should be able to do something like the following from pvpython, pvbatch or Python shell.<br><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">yourfilter.PointData.GetArray(<arrayname>).GetRange() # or CellData<br><br></span></div><div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">For example, for a Python script for a Wavelet source you would do the following:<br></span></div><div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">w = Wavelet()<br></span></div><div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">w.UpdatePipeline() # needed to execute the pipeline to create the output<br></span></div><div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">w.PointData.GetArray("RTData").GetRange()<br></span></div><div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)"><br></span></div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">This
 will work for the output of a filter that returns a regular VTK data 
set or a multiblock data set. If you want the range for only a single 
block of a multiblock I'd recommend using the Extract Block filter to 
get that block. It should be a shallow copy of the data set to do that 
so it should be very fast, even if you don't need the output of the 
Extract Block filter for anything else.<br><br></span></div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">Best,<br></span></div><span style="font-family:"courier";font-size:7.8pt;color:rgb(0,0,0)">Andy<br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 9:29 PM, kenichiro yoshimi <span dir="ltr"><<a href="mailto:rccm.kyoshimi@gmail.com" target="_blank">rccm.kyoshimi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I also want to know if there is a simple way to do, since I only have<br>
the somewhat redundant code:<br>
---<br>
source = GetActiveSource()<br>
<br>
#options for component: -1, 0, 1 and 2 => Mag, X, Y, Z<br>
component = -1<br>
<br>
cdi = source.GetDataInformation().<wbr>GetCompositeDataInformation()<br>
<br>
for i in range(cdi.GetNumberOfChildren(<wbr>)):<br>
  print 'Block Name: ', cdi.GetName(i)<br>
<br>
  data = cdi.GetDataInformation(i).<wbr>GetCellDataInformation()<br>
  for j in range(data.GetNumberOfArrays()<wbr>):<br>
    array = data.GetArrayInformation(j)<br>
    arrayName = array.GetName()<br>
    dataRange = array.GetComponentRange(<wbr>component)<br>
    print arrayName, dataRange<br>
---<br>
<br>
Thanks,<br>
yoshimi<br>
<div><div class="h5"><br>
2017-04-12 6:10 GMT+09:00 Jamison, Ryan Dale <<a href="mailto:rdjamis@sandia.gov">rdjamis@sandia.gov</a>>:<br>
> Hello Everyone,<br>
><br>
> I’m wanting to gain more control over automation with my paraview python<br>
> scripts. This time around, I’d like to be able to extract information from<br>
> the model and use it in my python script.<br>
><br>
> For example, I’d like to extract the minimum and maximum values of a cell<br>
> variable from a specific block and use those values in the python script.<br>
> Once I extract this information, I’d use it for some additional processing.<br>
> Something like:<br>
><br>
> minValue, maxValue = someCoolParaviewFunction(<wbr>blockName, variableName)<br>
><br>
> Is this possible? If so, any suggestions on how to do it?<br>
><br>
> Thanks,<br>
><br>
> Ryan<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>