Hi Eshan, can you please explain to me why Rhino has to install the same libraries each time I run a script on a fresh start of Rhino? Isn’t it installed? Is it just temporarily? Or have I missed something?
I also see that this happens every time a script is ran from a button, so some of my tools takes 8 seconds every time they are pressed because they install libraries over and over.
(And it would be really great if Rhino got locked and some feedback was given while this happens, because right now we can start other commands while this happens, or select other objects that are wrongly used if get-preselect=True is used)
Thanks again for the great work you have done, it is truly a huge step forward for me to be able to use libraries with python.
Ok this is great to know. I can make the “Restore” step lock the UI so nothing else could be done.
RH-73915 “Restore Packages” step should lock the UI so user can not make changes that changes script behaviour
Currently when you install a new Rhino WIP, it will setup a fresh instance of CPython runtime (Initialize Languages step). This will stop happening so frequently when we release the official Rhino as the runtime should stay fairly fixed after
Scripts currently attempt to install pip packages on every run. I made a ticket to make this step smarter
RH-73914 Scripts attempt to install packages on every run. This is very slow
I like that the script window is minimized when the script is ran, but if I run the command rs.OpenFileName() then that window is minimized too. Can you please look into that too?
(Now I have to click on the WIP icon on the task manager and click on the script icon for that window to restore the two windows so I can pick a file)
Hi @eirannejad I get a run script error if I use the path with backslash like this:
(This is the coding Windows uses if I copy the file path to memory)
This won’t work in any programming language that Rhino supports. Backslash is reserved for special characters like newlines (\n) and tabs (\t). If you need to use a backslash in a string, use double backslash. bitmap_path = “C:\\Users\\myname\\Pictures\\images.jpg”
I see that the latest update doesn’t show the errors in the same manner as before, making a bit harder to code for us noobs, but I guess this is being worked on. Right now I do the main typing in the PythonEditor and then copy it over the the RhinoCode ScriptEditor to test AND HERE comes the question :
Coud RhinoCode accept print without paranteses? A lot of python examples for Rhino uses print without them and it would be nice to be able to use scripts for v7 directly without having to edit them all.
Here you can see it works in the python editor but not in the new script editor.
Python 3 requires print to have parentheses while python 2 did not. It is typically one of the first things people run into when transitioning from 2 to 3.
Hi @eirannejad , thanks for the great updates, the autocompletion works much better and faster now!
And being able to hightlight and copy from the Terminal is great.
I still miss examples being shown like in EditPythonScript when we complete a command and hit “(” so I often open EditPythonScript alongside RhinoCode to quickly get the guidelines for the different commands in rhinoscriptsyntax or Rhino Common. Will this be implemented soon?
I would like for the icon for new script to be on the left side of the script tabs instead of to the right, that way we can quickly make a new script with out having to widen the editor window to see the end of the tabs.
And personally I prefer the tab for the new scripts to be added to the far left instead of to the right of the current tab, but that’s just me, so if this follows a standard then I’ll adjust
I would also prefer if Terminal was maximized on startup so I don’t have to click that every time.
The terminal still needs a scrollbar for it’s content if the content is longer than the Terminal width.
the print commands are not shown in realtime in the Command line. Please update this so we can send info to the Command line with print while a script is running. Now I have to use prompt instead, but then it isn’t shown in the history.
Here is a simple example:
print("Asking for user feedback")
real = rs.GetReal("Choose a number")
if real:
print(real)