<div dir="ltr">Juan,<div><br></div><div>Doing <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">programmable </span>selections is not well supported in Python presently. There will hopefully be future developments towards this in the near term.</div><div><br></div><div>For now, you can do something like:<br></div><div><br></div><div>

<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">from paraview import vtk</span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><font color="#000000" face="Courier"><span style="font-size:17.3333px">source = GetActiveSource()</span></font></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">idss = IDSelectionSource(IDs=[0, 2, 0, 3, 0, 4], FieldType=vtk.</span><span style="color:rgb(0,0,0);font-family:Courier;font-size:13pt">vtkSelectionNode.POINT</span><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">)</span></p>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">ex = ExtractSelection(Input=source, Selection=idss)</span></p><p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">Show(ex)</span></p><br></div><div>This will select points 2, 3, and 4 from the currently selected data source. Note that the list of IDs have the order [processor ID, point/cell ID, processor ID, point/cell ID, ...].</div><div><br></div><div>You can find documentation on additional selection types at <a href="https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.servermanager_proxies.html">https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.servermanager_proxies.html</a></div><div><br></div><div>HTH,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 26, 2018 at 3:19 AM,  <span dir="ltr"><<a href="mailto:jrojasca@ens-paris-saclay.fr" target="_blank">jrojasca@ens-paris-saclay.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am working to make a selection of points from a unstructured grid (associated to a .xmf file) in Paraview  to carry out a FFT of them later on. Doing this by using the GUI of Paraview is fairly  straightforward since there are several options to select these points. However, I need to this by coding it from the python shell option.<br>
<br>
I have already looked several books, presentations and help online without finding an example or a specific explanation about how to code the selection of  points by using python.<br>
<br>
I would really appreciate your help regarding this subject,<br>
<br>
Regards,<br>
<br>
Juan<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/opensou<wbr>rce/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/ParaV<wbr>iew</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="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/paraview</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div>