# Access particle property in another plugin

**URL:** <https://community.geodynamics.org/t/access-particle-property-in-another-plugin/1342>\
**Category:** ASPECT\
**Tags:** particle\
**Created:** [July 14, 2020, 4:03am UTC](https://community.geodynamics.org/t/access-particle-property-in-another-plugin/1342 "2020-07-14T04:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chester](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chester](https://community.geodynamics.org/u/Chester)\
**Post date:** [July 14, 2020, 4:03am UTC](https://community.geodynamics.org/t/access-particle-property-in-another-plugin/1342/1 "2020-07-14T04:03:19Z")

</div>

It’s easy to access one particle property in the plugin in which it is created. But how can I access other plugin’s property? For example, I want access to particle temperature from the build-in pTpath particle property in my own user-defined plugin. How can I do this?  
(Maybe the “get\_property\_component\_by\_name” function is helpful, but I don’t know how to use it exactly.)

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [July 16, 2020, 2:50am UTC](https://community.geodynamics.org/t/access-particle-property-in-another-plugin/1342/2 "2020-07-16T02:50:31Z")

</div>

Wang Shi:  
the properties attached to a particle aren’t kept in separate places, regardless of who created the particle or the property. They’re all stored in one long vector for each particle. That means that when you access a particle, you can always get all properties. The question is simply: Out of all of the numbers stored with a particle, which of these numbers correspond to a particular property (namely, the one you care about)? This is where the function you mention comes in: It translates from a symbolic name for a property to the position within the long vector. All you need to know is the symbolic name of the property you want to query.

I should mention that the function is deprecated and that you should be calling ParticlePropertyInformation::get\_position\_by\_field\_name() instead, which does the same thing.

Best  
W.

---

<div class="post-metadata">

**Author:** ![Chester](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chester](https://community.geodynamics.org/u/Chester)\
**Post date:** [July 16, 2020, 8:15am UTC](https://community.geodynamics.org/t/access-particle-property-in-another-plugin/1342/3 "2020-07-16T08:15:23Z")

</div>

> [@bangerth](#):
>
> get\_position\_by\_field\_name() instead

Thanks a lot! I constantly get warning about the deprecated function and didn’t know why. Very helpful.
