# How can I use a queryed result?

**URL:** https://forum.highend3d.com/t/how-can-i-use-a-queryed-result/4574
**Category:** Maya
**Tags:** mel
**Created:** [February 18, 2004, 1:12am UTC](https://forum.highend3d.com/t/how-can-i-use-a-queryed-result/4574 "2004-02-18T01:12:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bensharpe](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@bensharpe](https://forum.highend3d.com/u/bensharpe)
#### Post date: [February 18, 2004, 1:12am UTC](https://forum.highend3d.com/t/how-can-i-use-a-queryed-result/4574/1 "2004-02-18T01:12:52Z")

</div>

I can query the position of a partitular particle by going

particle -attribute position -id 5 -q particle1;  
// Result: -0.571217 -0.717975 -0.370524 //

How can I use this as the position of a different object??

---

<div class="post-metadata">

### Author: ![amitc](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@amitc](https://forum.highend3d.com/u/amitc)
#### Post date: [February 18, 2004, 3:49am UTC](https://forum.highend3d.com/t/how-can-i-use-a-queryed-result/4574/2 "2004-02-18T03:49:06Z")

</div>

$val[]=`particle -attribute position -id 5 -q particle1`;  
print ("posX= " + $val[0] );  
print ("posY= " + $val[1] );  
print ("posZ= " + $val[2] );

this should be of some help in moving forward
