Second to last command

I have come across a pro Rhino user who had a second to the previous command repeater assigned to the tab key, does anyone have a clue how to do that?

So basically, he was able to summon a command that he used prior to the last command by just clicking the tab button, FE: I created a cylinder and then I used scale1d and now I want to make another cylinder. The tab button was assigned to call the second to the previous command in this case not scale1d but the cylinder creation command

I have been searching for a way for months now, but still have not heard from anyone, so please rhino gods enlighten me

Hello- There is no provision for skipping a command that I know of in plain Rhino.Tab is not available for custom settings in plain Rhino. The user may havce had a plug-in or something.

-Pascal

Understandable, but is there a chance to bind the previous to the last command to any shortcut or something?

in Rhino 8 you can run use pyperclip and then do something like this. A bit of a hack but it seems to work (no error checking):

#! python 3
# r: pyperclip==1.8.2


import pyperclip
import re
import rhinoscriptsyntax as rs

rs.Command("-CommandHistory Clipboard")
text = pyperclip.paste()
result = (re.findall("(Command: _.+\n)", text))
command = (result[-2].split(" "))[1]
rs.Command(command)

Note that this won’t work well with aliases, unless you make your commands in aliases also start with _

2 Likes