Bug Report: Select Last Created Object & Select Previous Selection

While testing the Rhino 8 to create RC Planes, I might find a bug in SELECT LAST CREATED OBJECT.

Managed to simplify it like this:
Create a box, then create a new line. This makes the line as the last created object in order. If I immediately click SELECT LAST CREATED OBJECT, then it will instantly select the line. However, if I click and move the box and unselect it, then click SELECT LAST CREATED OBJECT, Rhino would immediately select the box and not the line. This would make SELECT LAST CREATED OBJECT evolves to SELECT PREVIOUS SELECTION :smile:

I hope this small bug could be fixed, as it would be useful if it works just as the function title in selecting last created object, as part of dynamic sketching (my own term) and free form modeling, combined with PushPull :slightly_smiling_face:

Hello - yeah, that is misleading, but that is how it works - under the hood, if you edit an object, say move it, the object is recreated in the new location replacing the original, and it becomes the last created object and goews to the top of the object list. The SelLast command is not intelligent, it just finds the first one in the list.

-Pascal

Is there a way to access this ordered list from within Python in Rhino? rs.AllObjects?

rs.FirstObject() is the most recent object “created” (First on top of the “stack”)
rs.NextObject() is the next object down the stack from another object (via it’s ID)
rs.LastObject() is the bottom of the stack, i.e. the oldest object in the file.

1 Like

Yes, but was thinking if there was a way to access the complete list without going through those functions.

One can get the object table via Python/RhinoCommon and create a list from it. I haven’t tried myself.

I think rs.AllObjects returns the ObjectTable, but i am not sure if it is ordered? I will test when i get the chance.

It should be ordered. I don’t remember if it’s top to bottom or vice-versa.

Edit: most recent object is first in the list.

Thanks everyone. Really appreciate the information.

I still wish that SelLast would deliver consistent execution that will address the last created object. The objective is as easy as this:

Let’s simplify it with a box. After creating a box, then a line from mid edge to another mid edge across it on a particular surface is created. After that, PushPull is executed then apply it to a surface that being splitted by the new created line. After successful PushPull command, then we could easily execute SelLast to select the line, and delete it as it’s no longer used. With these commands order, we could create a script to perform it, without populating the object with unused curve in the end :slightly_smiling_face:

I do wish that this could be implemented :innocent: