# Application data bound to vtkActor

**URL:** https://discourse.vtk.org/t/application-data-bound-to-vtkactor/2405
**Category:** Web
**Created:** [January 11, 2020, 3:16am UTC](https://discourse.vtk.org/t/application-data-bound-to-vtkactor/2405 "2020-01-11T03:16:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mhalle](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/50afbb/32.png) [@mhalle](https://discourse.vtk.org/u/mhalle)
#### Post date: [January 11, 2020, 3:16am UTC](https://discourse.vtk.org/t/application-data-bound-to-vtkactor/2405/1 "2020-01-11T03:16:12Z")

</div>

Is there a way to associate private data with an actor in vtkjs?

I want to be able to get back a handle to some application state when picking.

Is using a JS Map my best option?

Thanks.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [January 11, 2020, 8:17am UTC](https://discourse.vtk.org/t/application-data-bound-to-vtkactor/2405/2 "2020-01-11T08:17:16Z")

</div>

You can easily do that on any vtk Object.

```auto
const noWarning = true;
actor.set({
  userData: { ... }
}, noWarning);

const userData = actor.getReferenceByName('userData');

```

---

<div class="post-metadata">

### Author: ![mhalle](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/50afbb/32.png) [@mhalle](https://discourse.vtk.org/u/mhalle)
#### Post date: [January 11, 2020, 1:46pm UTC](https://discourse.vtk.org/t/application-data-bound-to-vtkactor/2405/3 "2020-01-11T13:46:34Z")

</div>

Thanks. It would be great if some of this lower level functionality was documented a little better (observation, not criticism). Vtk.js has its own way of doing lots of things, some of which brought over from VTK, so even fairly experienced JS programmers can’t necessarily rely on standard patterns to figure things out on their own.
