It is possible to convert the macro to the RhinoScript?

Yep… In Rhino options, no possibility of using Python as startup scripts that I can see (aside from the workaround above) and having to go into the Python editor to set file search paths for python scripts separately from Options>Files>SearchPaths. I think we’ve discussed this before… :slight_smile: --Mitch

I see something different. If i open the python editor in a new session of Rhino, paste the script which only imports the methods used in the script, the script starts to ask for the circle center almost immediately. I would say it is a 0.25s delay. Opening the python editor takes much longer.

But i will never create my scripts as shown in the last example, because i never know what methods i will use to write them beforehand and doing the individual imports disable autocomplete in the editor. It is much more convenient to type rs followed by the dot and than have the autocomplete function imho.

c.

It is necessary that all the functions of a Python full loaded when Rhinoceros start. Let it will take some time.

After all, when open Rhino, we rarely immediately begin using Python.
Is not it? :wink:

I understand why there is a delay.

For the experiment, I made two aliases for this script.

First as a macro, and the second a .py file

Alias in the Rhino start, but nothing happens. the script is not executed when start Rhino.
Something is blocking its implementation

This the delay reason.

Is it possible with the help of RhinoScript to cause execution of Python?

And try so that at the start?

As convoluted as it is, you actually CAN run python script via RhinoScript using:

Rhino.Command -_RunPythonScript ( …python script body goes here with all correct “”, new line characters etc. )

  • or -
    Rhino.Command -_RunPythonScript chr(34)&PathToYourPythonFile&chr(34)

Don’t have time to test it now but could be a workaround to running python scripts at startup…

-j

I’m not using the editor at all in my examples, I was talking about running scripts from aliases or toolbar buttons.

–Mitch

If in the alias to create a macro with such content:

! -_RunPythonScript
(import rhinoscriptsyntax, scriptcontext, Rhino
print “Python loaded”
)

then Python is not performed when Rhino start
And if remove in the macro line
print “Python loaded!”
in that case, it is executed.

Why interfere with line of print “Python loaded!”?

Hi @Jarek !
Unfortunately I couldn’t make work your method

Hi Leex,

Drag and drop the attached script on top of a running Rhino 5 for Windows. Then run “LeexCircle”.

– Dale

LeexCircle.rvb (1.0 KB)

Hi Dale!
This is cool!!
Many thanks for your work!
I am very grateful :wave:

Thanks