Rhino 8 Grasshopper Script Editor - Design Feedback

This seems to be fixed now. All good! Thanks!

1 Like

Has anybody managed to get the new C# script editor to work with the script input?

I am not able to get it to print anything in this simple example.

If I remove a trailing semicolon, I get a syntax error, so it seems the script is correctly parsed.

Am I missing something obvious here?

Edit: nevermind, solved (thanks @ale2x72 !)

1 Like

@ianis.lallemand Currently the ScriptInstance implementations do not work from input script. I made a ticket to improve this

RH-81986 Support ScriptInstance in input scripts

1 Like

RH-81587 is fixed in Rhino 8 Service Release 8 Release Candidate 1

Hello

Is the development of the new c# editor dropped?
I see no changes since more than a month ago.
All the points I reported are pretty much the same.
We are at 8.8 and c# code editor is still unusable.
UI, UX and bugs. Nothing is good.

You made coding an awful experience, and new coders will look away instead of dive in.

Please bring back the old editor, it was perfect compared to this.

1 Like

@maje90

There is only one single editor for all languages and it is under active bug fixing and improvements.

Both the legacy IronPython and CSharp components are still in grasshopper as hidden components. You can find them by searching as #GHPython or #C# in Grasshopper canvas. Create a UserObject from them so they’re more easily available.

1 Like

Just to clarify, those legacy components are different in Rhino 8 than they were in Rhino 7 because the old editor controls were replaced with a new one. The editor control on the mac was not the same one as the editor control on windows. The one on windows was a closed source black box that is incompatible with the frameworks in Rhino 8. It was not perfect and keeping it was not an option.
We are aware of the problems with the new editor and like Ehsan says, we are constantly fixing and improving. Some bugs are harder to fix than others and it takes time.

2 Likes

Yeah, I know. Luckily!
I currently make my scripts in Grasshopper in Rhino 7, and the times I try to go to Rhino 8 I simply use them as they are.
But they are completely broken coding-wise. They just execute properly the code, that’s it. But any edit have to be done in Rhino 7.


I would like to test the new ā€œRhinoā€ tab in grasshopper, but as long the c# editor is not working, that won’t happen.
(Also, I use c# scripts often to export hundreds of .dxf or .stp files at once, the new ā€œRhinoā€ tab doesn’t help. Quite delusional.)


Anyway, how many posts with people posting c# snippets you remember to see in this forum, in past?
From David Rutten, Steve Baer, Daniel Piker, Laurent Delrieu, Peter Fotiadis, etc etc etc (too long to mention all the pros) … it was a dream!
The c# script editor was THE perfect playground to quickly make simple codes, to try stuff, to learn! Before going to VS, you could test almost completely anything thanks to the c# editor.

Now? Impossible. Too cumbersome.
How many c# script components from Rhino 8 have you seen here in the forum?
Little to none?


Rhino 8 c# scripts!
Where are those? Where? They should’ve been a revolution for developers!
Why I haven’t seen a single post in this forum about people using it?
Don’t you think it might be because people gave up trying?

For me, loading a 7 c# script in GH and start it with a button is simpler than having to bear with 8 editor. What a defeat.

It’s incredible we are at SR .8 and this isn’t fixed.
As Rhino is seen as a ā€œdeveloping platformā€ (or such), this should be in the top 5 priority…
Current Rhino 8 users have 2 broken code editors, the new and the #C# old one, with no access to Rhino 7, expect new developers to be less than in past.
Instead of a bike, you gave them a unicycle with a flat tire.

3 Likes

I’m sorry but the situation is not really much better than months ago.
I really try.
After 60 seconds you encounter something too bothersome to continue, and give up.

To be clear, the situation should become a ā€œok, now it let me code as fast as in Rhino 7ā€ … until it’s not, people will code in Rhino 7 editor.

There is no ā€œdecent enoughā€, particularly after people had access to a better tool.

3 Likes

I totally agree with Riccardo, I mostly use R7 and if I had to use R8 (because of Shrinkwrap mostly) I use the C# editor with Visual Studio open in order to write the code ! And then I include the code in a dll in order to have quite no code to put in R8 C# editor. And I do that because it is a job that requires Shrinkwrap.

1 Like

@maje90 and @laurent_delrieu what is the first ā€œpainā€ that we inflict on you when using the V8 editor? Maybe we can prioritize on this.

1 Like

The ā€œautocompletionā€ thing.
Extend surface still not a thing in GH, ok, let’s do it via c# (my usual short lesson in Gh7).
2024-06-09 12_10_55-Window
Too often the editor completely forget you are filling up a method, the method description disappear and, instead, that 200% useless list appears (please get rid of that anywhere).

ā€œthis.ā€ is not working. RhinoDocument, GrasshopperDocument, Component can’t be accessed.
Similar with external .dll libraries.

The list is long, in my position lot of stuff are needed to have something useable hourS/day.


Edit:

worded that way, actually it’s the developers asking once again of what are the problematic points, after I (and others) made multiple lists over time re-reporting the same problems
Once again my thought are ā€œis anyone at mcneel using the tool itself?ā€ …

No hard feelings. I need to use words as heavy as the situation i see.
Love you guys, I hope for the best.

1 Like

While I don’t have much experience with C# development in the new editor yet, I too find it unsuitable for IronPython development and largely inferior to GHPython. By order of priority of what is stopping me from using the new editor would be:

  1. Performance: The IronPython script editor is roughly 25-33% slower than GHPython in the tests I’ve done (including real-life project components). And the CPython editor is MUCH slower than GHPython, specifically when implementing RhinoCommon. While the latter is understandable, the former to me is a deal-breaker (as is the situation with the console/terminal). If you can trim the fat, or let the user turn off features that bog down performance (maybe the debugger could be partially responsible), that would would great. I’d expect a new editor to be more performant, not less.

  2. Code legibility: I’m having a harder time reading the text and syntax highlighting than I am in GHPython. I know @Alain is already working in these issues, so hopefully we’ll see some improvements there soon.

  3. Design/structure: This was the original intention of this topic. And while there have been great improvements, there are still plenty of remaining issues, which overall make the editor feel quite janky/verbose, and not very balanced, minimal or ā€œzen-likeā€, if that makes any sense :upside_down_face:

3 Likes

I don’t know the insights obviously, so maybe I’m missing something technical-wise and/or buisness-wise, but my opinion is that new editors shouldn’t try to replace old one versions, but be an addition. Same as it is with GH2 now.

Generally from my point of view Rhino 7-8 development decisions regarding direction of new features related to GH are risky, because these are huge UI rewrites (I mean both editors and GH2). Such rewrites even though sound great at the beginning (the thought of new version of GH and new code editors sounds exciting at first) and they seem to make sense (we will do one step back at the beginning, but because of that we will be able to move two steps forward in the future) they often end up as being always one step back, at least this is my experience with code rewrites.

Generally as long as I can easly pick any editor I want to use (old one or new) I don’t see there is a problem. Same with GH, but that’s another topic :slight_smile: In short: I’d suggest to change current strategy from rewriting to expanding. I’m more excited about things like Hops, new components from Andy Payne, than these rewrites, even though these rewrites looks better on paper.

Love you guys as well :slight_smile:

2 Likes

That would be fantastic!
But, for some reasons they keep saying it is impossible to have the old code editor in 8, so we are left with that broken #c# editor that is barely a text editor… so, to code c# in 8 you are forced to struggle with the new editor.

About autocompletion.

FWIW, it works very similarly to vscode.

But we understand that this is too verbose for many. The autocomplete list is long. If you don’t want to have an autocomplete list while the signature help window is open, the code editor now has an option to turn it off although it hasn’t made it’s way to the UI yet. Word based autocomplete, the words that appear in the list by parsing your code, can also be turned off. But our goal is to improve this list, make it smaller and more relevant options at the top. We’re working on that.

There are events that can cause the method signature window to close like deleting the last brace or having the cursor go past it. You could always pop it back up with shift+ctrl+space but now typing a coma will also reopen it.

There are many other issues with autocomplete and we are aware of them and doing our best to prioritize and fix them.

2 Likes

Please, give also an option to shut it off completely. That list have to go.
I personally need only to see the current method what and where to put the variables, the descriptions… so I don’t have to open the documentation.
I’m on 8.8.24142.13001, 2024-05-21 and
2024-06-09 14_49_18-Window
Even adding a space like you did… I can see only the dumb list.


You know even microsoft windows have countless shortcuts and key-combo for useless stuff?
Well, most people don’t.
Please make the editor work without having to know hidden key-combo.

… not here. Talking about next SR? SRC?

It should be: 1- pressing ESC key or 2- having the cursor outside the ā€œ(ā€ ā€œ)ā€ brackets of that method, nothing else. If the method description window close for any other reason, it’s a bad UX.
Also, already said, it should drop-down.
Making it go up will cover the code you just wrote, imho it’s wrong.

Just try to replicate the good old editor in everything :smiling_face_with_tear:

You mentioned my name and I’m responding to only recent comments. This thread is very long and I know that Ehsan and Alain have been supporting it so I am not completely up to date on all of the details.

I understand, sorry about that.