# Select a cell in python script

**URL:** https://discourse.paraview.org/t/select-a-cell-in-python-script/1730
**Category:** ParaView Support
**Created:** [April 27, 2019, 10:31pm UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730 "2019-04-27T22:31:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Mariana\_Rodriguez](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mariana_rodriguez/32/1668_2.png) [@Mariana\_Rodriguez](https://discourse.paraview.org/u/Mariana_Rodriguez)
#### Post date: [April 27, 2019, 10:31pm UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/1 "2019-04-27T22:31:03Z")

</div>

I am using Python script to select a cell in the mesh.  
I want to get its information: its nodes and their coordinates.

What is the command in the script to select a cell?

Thank you.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 29, 2019, 7:19am UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/2 "2019-04-29T07:19:17Z")

</div>

How do you want to select ? Location ? CellId ?

---

<div class="post-metadata">

### Author: ![Mariana\_Rodriguez](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mariana_rodriguez/32/1668_2.png) [@Mariana\_Rodriguez](https://discourse.paraview.org/u/Mariana_Rodriguez)
#### Post date: [April 29, 2019, 11:17am UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/3 "2019-04-29T11:17:22Z")

</div>

Hi,  
I want to select a cell and then be able to get it’s nodes and coordinates.

I need to do this large number of time. So I need to know how can I do this in Python script.

Thanks!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 29, 2019, 11:19am UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/4 "2019-04-29T11:19:35Z")

</div>

How do you want to select ?

---

<div class="post-metadata">

### Author: ![Mariana\_Rodriguez](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mariana_rodriguez/32/1668_2.png) [@Mariana\_Rodriguez](https://discourse.paraview.org/u/Mariana_Rodriguez)
#### Post date: [April 29, 2019, 11:29am UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/5 "2019-04-29T11:29:56Z")

</div>

I wan to use extract selection. And then go cell but cell in a Python script.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 29, 2019, 1:05pm UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/6 "2019-04-29T13:05:27Z")

</div>

You seem to be missing the point of my question. In order to know if you can do your selection in Python, you need inform us how you want to perform the selection.

Do you use Edit-\>FindData ? Do you use the Select Cells on ou Select Cells Through tools ?

---

<div class="post-metadata">

### Author: ![Mariana\_Rodriguez](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mariana_rodriguez/32/1668_2.png) [@Mariana\_Rodriguez](https://discourse.paraview.org/u/Mariana_Rodriguez)
#### Post date: [April 29, 2019, 11:05pm UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/7 "2019-04-29T23:05:38Z")

</div>

I used Edit -\> FindData.

I don’t know how to save the selection using python.

Is there any way to do this?

Thanks a lot!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 6, 2019, 10:44am UTC](https://discourse.paraview.org/t/select-a-cell-in-python-script/1730/8 "2019-05-06T10:44:15Z")

</div>

Yes indeed, here is an exemple :

```
sel=SelectPoints("RTData > 170")
e = ExtractSelection(Selection=sel)
```
