Last modified objects


#1

Hello Forum,

is there a way to get the list of the last modified objects under RhinoCommon?

Thanks. L


(Menno Deij - van Rijswijk) #2

I think you should be able to combine doc.Objects.MostRecentObject() and doc.Objects.AllObjectsSince(obj):


var obj = doc.Objects.MostRecentObject();
// do stuff

RhinoObject[] lastModified = doc.Objects.AllObjectsSince(obj);

(Dale Fugier) #3

If you are scripting Rhino command and need to know what changed, you can do something like this:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsLastCreatedObjects.cs

– Dale


#4

Dale,

perfect!

Thanks. L


(Dale Fugier) #5

It appears the solution provided by @menno is identical to that of mine, and perhaps a bit more modern…