# Selecting Last Item Created?

**URL:** https://forum.highend3d.com/t/selecting-last-item-created/2075
**Category:** Maya
**Tags:** mel
**Created:** [July 23, 2007, 2:59pm UTC](https://forum.highend3d.com/t/selecting-last-item-created/2075 "2007-07-23T14:59:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deltav](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/e9c0ed/32.png) [@deltav](https://forum.highend3d.com/u/deltav)
#### Post date: [July 23, 2007, 2:59pm UTC](https://forum.highend3d.com/t/selecting-last-item-created/2075/1 "2007-07-23T14:59:22Z")

</div>

I have a script that will generate a point list and build curves based on those points...but I really need to figure a way to select the last item created and assign it to a specific layer

---

<div class="post-metadata">

### Author: ![gentlesea](https://forum.highend3d.com/user_avatar/forum.highend3d.com/gentlesea/32/54671_2.png) [@gentlesea](https://forum.highend3d.com/u/gentlesea)
#### Post date: [July 23, 2007, 3:29pm UTC](https://forum.highend3d.com/t/selecting-last-item-created/2075/2 "2007-07-23T15:29:16Z")

</div>

I would be interested what kind of points you mean. If these points behave as usual objects, they are automatically selected upon creation. If that is the case, the assignment is simple:

CODE  
editRenderLayerMembers -noRecurse yourRenderLayer `ls -selection`;

---

<div class="post-metadata">

### Author: ![deltav](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/e9c0ed/32.png) [@deltav](https://forum.highend3d.com/u/deltav)
#### Post date: [July 23, 2007, 3:45pm UTC](https://forum.highend3d.com/t/selecting-last-item-created/2075/3 "2007-07-23T15:45:34Z")

</div>

by points I mean edit points...I am taking survey data and using it to make an enviroment

---

<div class="post-metadata">

### Author: ![gentlesea](https://forum.highend3d.com/user_avatar/forum.highend3d.com/gentlesea/32/54671_2.png) [@gentlesea](https://forum.highend3d.com/u/gentlesea)
#### Post date: [July 23, 2007, 4:10pm UTC](https://forum.highend3d.com/t/selecting-last-item-created/2075/4 "2007-07-23T16:10:19Z")

</div>

I see. Edit Points go together with curves for example. You could construct your curve using the appropiate Edit Points of your survey data. Construct the curve with the points you want in the desired order and you can access them by using:

CODE  
select -tgl curve1.ep[1];  
select -tgl curve1.ep[2];  
select -tgl curve1.ep[3];  
select -tgl curve1.ep[4];  
...

Does this help you? If partially, please describe the task a little bit more.
