Translate RhinoObject from GrassHopper while keeping the reference?

Can I translate a RhinoObject from a GrassHopper component while keeping the reference in GrassHopper (that is, without “baking” a new identity and so lose the “connection” with the GH component referencing it).

When I try to Translate the object I get a new object as a result, but if I set the translation option “deleteOriginal = true” I get an error message telling me an “object has expired” etc.

Guid id = doc.Objects.Transform(obj, xform, true);

Since the whole GH definition is reacting on that very guide object, everything stops when I can’t keep the identity of the translated object intact on Translation. It’s probably simple to fix but the hour is late and…

Thanks in advance,

// Rolf

What I want to do is to “reset” the position of a a Brep which I use as a manual guide for defining directions etc. This is done by dragging a small sphere around the Viewport. But then I would also like to be able to “reset” the position of the Rhino sphere to a specific point (for example 0,0,0), using a button on the GH canvas. And this is what the Translation is done for.

// Rolf

Technically should be possible, but I think the problem is that you’re changing the Rhino document from within a solution, which causes another solution to start in the middle of your current solution.

If you want to modify a referenced object from code running in GH, then you should try and run that code outside of the solution. I’ll see if I can set something up.

IWantToMoveItMoveIt.gh (13.1 KB)

Perfetto! Thanks.

It does exactly what I was looking for.

It would be very valuable with basic class diagrams + sequence diagrams for the most common events being fired.

// Rolf