Undo after a multiple command alias


It may be a naive question, but I’m quite new at rhino.
I’ve defined an alias to paste the clipboard relatively to the cplane:

!_Paste _orient3pt _copy=no w0 w1,0,0 w0,1,0 0 1,0,0 0,1,0

It works, but to undo it I have to undo twice, once for the orient3pt and once for the paste (and usually I forget the second one, so I end up with unwanted stuff in my model).

There’s a simple way - without scripting - to “atomize” my alias so that only one undo is needed?

Thanks in advance



Hi Paul - no way that I know of.


Well you could package it up in a “script” I suppose, but that’s a different level of automation.

Hi, you can try wrapping your macro into a one-liner RhinoScript command that just runs your macro, like this:

-_RunScript (Rhino.Command"!_Paste _orient3pt _copy=no w0 w1,0,0 w0,1,0 0 1,0,0 0,1,0")

(use the above as your alias / macro). This way one undo should do it all.

Basically any macro you paste between “…” there would work that way, unless your macro has some double quotes on its own, then it gets a bit more complex with using multiple double quotes ; )



I was taking him at his word… -(:^/


1 Like

Technically this is still a Macro…:wink:

-_RunScript (Rhino.Command"!_Paste _orient3pt _copy=no w0 w1,0,0 w0,1,0 0 1,0,0 0,1,0")

Thanks Jarek (and thanks to everyone else who answered). This does exactly what I wanted (and it’s quick, not loading any script), and is a powerful trick too.