# grabbing loaded data from shell

**URL:** https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913
**Category:** ParaView Support
**Tags:** python
**Created:** [November 15, 2018, 6:14pm UTC](https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913 "2018-11-15T18:14:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kayarre](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kayarre/32/1994_2.png) [@kayarre](https://discourse.paraview.org/u/kayarre)
#### Post date: [November 15, 2018, 6:14pm UTC](https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913/1 "2018-11-15T18:14:13Z")

</div>

in 3d slicer there is a way to grab data that is already loaded with the grabNode() function, is there a similar function in paraview where you can interactively grab a loaded dataset and apply other vtk filters to it?

this in the context of using the python shell along with the gui.

---

<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: [November 16, 2018, 8:13am UTC](https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913/2 "2018-11-16T08:13:00Z")

</div>

This is a task for `servermanager.Fetch`, be aware that it can be expansive to call it in some cases.

```
from vtk import *
s=Cone()
object = servermanager.Fetch(s)
writer = vtkXMLPolyDataWriter()
writer.SetInputData(object)
writer.SetFilename("test.vtp")
writer.Write()
```

---

<div class="post-metadata">

### Author: ![kayarre](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kayarre/32/1994_2.png) [@kayarre](https://discourse.paraview.org/u/kayarre)
#### Post date: [December 19, 2018, 11:48pm UTC](https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913/3 "2018-12-19T23:48:21Z")

</div>

this is helpful but when I say loaded I mean loaded via the gui. not the python shell.

an example would be to access the origin of a triangle surface that was already loaded via the gui and get the object as a python object in the shell.

---

<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: [December 21, 2018, 10:39am UTC](https://discourse.paraview.org/t/grabbing-loaded-data-from-shell/913/4 "2018-12-21T10:39:42Z")

</div>

The python shell is compatible with the GUI.

In the GUI, in the Pipeline Browsser, click on the source you want to examine, then :

```auto
s = GetActiveSource()
object = servermanager.Fetch(s)

```
