<div dir="ltr"><div><div><div>Hi Paul,<br><br></div>I think because of the bug you'll need to cobble together the Python script you want. First you can try doing everything in the GUI and recording it in a single trace and see if manually adding in the:<br><span class="im">selection = SelectCells(query="id==0")<br>ec = ExtractSelection(Selection=selection)<br>ec.UpdatePipeline()<br>
</span>PlotSelectionOverTime(Input=ss,Selection=ec)<br><br></div>parts as needed. If this doesn't work you may have to record everything up to the above point. Then do the selection and PlotSelectionOverTime() manually in the GUI as well as appending to the Python script, and then finally doing another trace with the final couple of steps.<br><br></div><div>Let me know if that works for you.<br><br></div><div>Regards,<br></div><div>Andy<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 4:10 PM, Paul DesJardin <span dir="ltr"><<a href="mailto:ped3@buffalo.edu" target="_blank">ped3@buffalo.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andy,<br>
<br>
Thanks for the quick response. I tried the following in the python<br>
window with the integrated variables highlighted in the GUI ....<br>
<br>
>>> ss = GetActiveSource()<br>
<span class="">>>> selection = SelectCells(query="id==0")<br>
>>> ec = ExtractSelection(Selection=selection)<br>
>>> ec.UpdatePipeline()<br>
</span>>>> PlotSelectionOverTime(Input=ss,Selection=ec)<br>
<br>
and the below output was spit to the the Output Messages indicating<br>
that nothing was selected. Does the above syntax make sense to you?<br>
<br>
Paul<br>
<br>
<br>
<br>
<br>
Generic Warning: In<br>
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx,<br>
line 134<br>
<br>
Failed to generate state.<br>
<br>
<br>
<br>
Traceback (most recent call last):<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smstate.py",<br>
line 170, in get_state<br>
<br>
traceitem.finalize()<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 752, in finalize<br>
<br>
trace.append(accessor.trace_ctor(ctor, filter_type))<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 430, in trace_ctor<br>
<br>
ctor_props_trace = self.trace_properties(ctor_props, in_ctor=True)<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 423, in trace_properties<br>
<br>
return joiner.join([x.get_property_trace(in_ctor) for x in props])<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 533, in get_property_trace<br>
<br>
if in_ctor: return "%s=%s" % (varname, self.get_value())<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 553, in get_value<br>
<br>
data = [str(Trace.get_accessor(x)) for x in self.get_object()[:]]<br>
<br>
File "/Applications/paraview.app/Contents/Python/paraview/smtrace.py",<br>
line 167, in get_accessor<br>
<br>
"it. Skipping this action." % repr(obj))<br>
<br>
paraview.smtrace.Untraceable:<br>
"<paraview.servermanager.IDSelectionSource object at 0x1263de250> is<br>
not 'known' at this point. Hence, we cannot trace it. Skipping this<br>
action."<br>
<br>
Empty state generated.<br>
<br>
Generic Warning: In<br>
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx,<br>
line 112<br>
<br>
Tracing is active. Cannot save state.<br>
<br>
<br>
<br>
Empty state generated.<br>
<br>
ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
line 810<br>
<br>
vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection<br>
index 0 on input port index 1 for algorithm<br>
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type<br>
vtkUnstructuredGrid, but a vtkSelection is required.<br>
<br>
<br>
<br>
ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
line 810<br>
<br>
vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection<br>
index 0 on input port index 1 for algorithm<br>
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type<br>
vtkUnstructuredGrid, but a vtkSelection is required.<br>
<br>
<br>
<br>
Generic Warning: In<br>
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMPropertyHelper.cxx,<br>
line 641<br>
<br>
Call not supported for the current property type.<br>
<br>
<br>
<br>
ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
line 810<br>
<br>
vtkPVCompositeDataPipeline (0x7ff19b7f6dc0): Input for connection<br>
index 0 on input port index 1 for algorithm<br>
vtkPVExtractArraysOverTime(0x7ff198f30380) is of type<br>
vtkUnstructuredGrid, but a vtkSelection is required.<br>
<br>
<br>
<br>
ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
line 810<br>
<br>
vtkPVCompositeDataPipeline (0x7ff1963cedc0): Input for connection<br>
index 0 on input port index 1 for algorithm<br>
vtkPVExtractArraysOverTime(0x7ff198b8e7e0) is of type<br>
vtkUnstructuredGrid, but a vtkSelection is required.<br>
<br>
<br>
<br>
ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
line 810<br>
<br>
vtkPVCompositeDataPipeline (0x7ff1963cedc0): Input for connection<br>
index 0 on input port index 1 for algorithm<br>
vtkPVExtractArraysOverTime(0x7ff198b8e7e0) is of type<br>
vtkUnstructuredGrid, but a vtkSelection is required.<br>
<br>
<br>
<br>
Generic Warning: In<br>
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/ParaViewCore/ServerManager/Core/vtkSMPropertyHelper.cxx,<br>
line 641<br>
<br>
Call not supported for the current property type.<br>
<div><div class="h5"><br>
<br>
<br>
On Thu, Mar 26, 2015 at 3:49 PM, Andy Bauer <<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>> wrote:<br>
> Hi Paul,<br>
><br>
> This should get tracked in the Python Trace functionality. I'll add a bug<br>
> report for this. For now you can do it manually with something like:<br>
>>>> w = Wavelet()<br>
><br>
>>>> selection = SelectCells(query="id==0")<br>
><br>
>>>> ec = ExtractSelection(Selection=selection)<br>
><br>
>>>> ec.UpdatePipeline()<br>
><br>
><br>
> This should select the first cell of the Wavelet source and extract it. For<br>
> point selection replace SelectCells with SelectPoints. There's probably more<br>
> complex selections for multiblock data sets but talking to you I thought you<br>
> had an unstructured data set. For the query string, you can see how more<br>
> complex queries are created in the Find Data option under the Edit menu.<br>
><br>
><br>
> Let me know if this doesn't work for you.<br>
><br>
><br>
> Cheers,<br>
><br>
> Andy<br>
><br>
><br>
><br>
> On Thu, Mar 26, 2015 at 3:28 PM, Paul DesJardin <<a href="mailto:ped3@buffalo.edu">ped3@buffalo.edu</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I'm trying to use the PlotSelectionOverTime command in a python script<br>
>> for use with pvbatch. When using PlotSelectionOverTime in the GUI,<br>
>> there is a "Copy Active Selection" operation required which I cannot<br>
>> replicate in the python script. The incremental trace option doesn't<br>
>> appear to provide information since nothing is reported when the the<br>
>> "Copy Active Selection" button is pushed.<br>
>><br>
>> Any help would be much appreciated.....<br>
>><br>
>> Thanks!<br>
>><br>
>> Paul<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.kitware.com/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" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
=========================================<br>
Paul DesJardin, Ph.D.<br>
Professor<br>
University at Buffalo, State University of New York<br>
Buffalo, NY 14260-4400<br>
Tel: <a href="tel:716-645-1467" value="+17166451467">716-645-1467</a><br>
email: <a href="mailto:ped3@buffalo.edu">ped3@buffalo.edu</a><br>
web: <a href="http://cet.eng.buffalo.edu" target="_blank">cet.eng.buffalo.edu</a><br>
=========================================<br>
</font></span></blockquote></div><br></div>