Default command option

Is there a way to change the default command option in Rhino?

What I mean is when I call the command arc for example, by default is asking for the center, start and end, but I always use start, end and middle point, can I change this?

Many thanks.

How are you invoking the command? You could create an alias with the following macro:

! _Arc _StartPoint

A toolbar button with this macro exists in the Arc toolbar.

HTH, --Mitch

Thank you!!

@Helvetosaur ,

I have the same question. Any way to retain my default preferences for some commands ?
For instance the curve filet command, I want it to always join lines after. Any way to make this preference permanante?

image

thanks
CC

That setting should be sticky - it is here.

@Helvetosaur , it is sticky to the file, thanks for pointing this out.

One question still, why the command “printdisplay” doesn’t have the same sticky behavior. All the time I reopen my file, I have to re-enable printdisplay state on and switch it to scale 100.

Wim suggested a macro here , but it complexify the thing.

Regards,
CC

Yeah, not all the Rhino command-line options are ‘sticky’. What you can do is create that macro with the correct options for you and put the macro in your startup commands. Then when you run Rhino it will automatically be set to your specs.

1 Like

Is it a behavior that could be harmonized for all rhino cmds ? I would appreciate if that could be added to the wishlist.

Thanks,
CC

Here’s a python script that will run a custom macro (saved in document user text).

Set the python script to run every time Rhino starts, and it will check if you have specified a custom macro for each document you open and run it automatically if so.

Run the script from within a document to add/edit/delete/run the custom macro for that document.

import rhinoscriptsyntax as rs

KEY = "CUSTOM_STARTUP_MACRO"

"""

Set this macro to run every time Rhino starts:

NoEcho -RunPythonScript "Full\Path\To\Script.py" Run

"""

def main():
	new, edit, delete, run = "New", "Edit", "Delete", "Run"
	text = rs.GetDocumentUserText(KEY)
	if text is None:
		options = [new]
		default = new
	else:
		options = [edit, delete, run]
		default = edit
	result = rs.GetString("Custom Startup Macro", default, options)
	if result in (new, edit):
		text = rs.StringBox("Enter new macro", text, "Custom Startup Macro")
		if text is None:
			print("Cancel")
			return
		rs.SetDocumentUserText(KEY, text)
	elif result == delete:
		rs.SetDocumentUserText(KEY)
	elif result == run:
		if text is None:
			return
		rs.Command(text)
	else:
		print("Cancel")

if __name__ == "__main__":
	main()
1 Like