Automatically Create UI's from Grasshopper Scripts

Hey Rhino and Grasshopper community -
I’ve been working on a plugin prototype that’s aimed at making it easier to (1) create simple User Interfaces for Grasshopper scripts and (2) get them in the hands of users that are not as comfortable in GH.

There are plenty of plugins, libraries, and features that already do some version of this: HumanUI, Synapse, UI+, the Remote Control Panel, and I’m sure others.

What I’ve tried to do is make the setup as easy as possible. Many people already have a habit of grouping inputs and outputs together and labeling them in some way; the idea is to take advantage of that work you’ve already done and simply compose the UI based on the arrangement on your canvas. No special Grasshopper components, or composing a Remote Control Panel by hand.

I also want to make it as simple as possible to use, so there is a “Library” feature, where you can organize your scripts in folders and subfolders just using your file system. As long as other users can access that folder (e.g. on a company server), users can access them from a dropdown and load the UI without seeing Grasshopper at all (except the graphic when GH is loading the first time).

Finally, it allows you to load multiple scripts and have them trigger sequentially. I.e., when one script finishes, trigger the next one. I think with Grasshopper scripts that reference/import/bake objects (e.g. eleFront, Human, the new GH1 components in Rhino 8), that could unlock some really powerful use cases. And while this is running Grasshopper on the user’s computer, you could quickly compiles interfaces for Hops components, Speckle, etc.

“Suimple” (Simple + UI, pronounced “swimple”) is on the package manager now. Make sure to check Include pre-releases when you’re looking for it. I consider this an alpha release, with some important features still WIP, but I wanted to get a prototype out there and see if people find this useful / make sure it works / what features are most important.

More detailed documentation here.

This was developed primarily in Rhino 7 for Windows. It seems to work fine in Rhino 8, haven’t been able to test it on Mac yet.

I’m hoping there are others out there that will find this useful, and feedback is welcome!

27 Likes

This is really cool @krahimzadeh, it’s a very intuitive way of creating UIs from scripts. Is there a way to reload the UI to see how changes in the inputs change the UI?

– cs

1 Like

Glad to hear it! That’s what I’m hoping for.

Yeah you should be able to reload the script. If you are actively working on a GH file, then probably it’s best to use the Active Files loader:

That will give you a list of all the GH files you have open. Then as you make changes you can simply hit the “Load” button again. For now, it will completely re-build the form. Perhaps in the full version there can be some smarts to only change what is different.

If you’re loading from a file, either via the Library option, or the From File option, then you can similarly hit the Load / Re-Load buttons, but it will do so from the file, so you need to make sure you save your changes.

Hope that helps!

3 Likes

Very cool! :sunglasses:

1 Like

@Keyan_Rahimzadeh thank you very much for sharing your work. This has an enormous potential.
Upon arriving to the office this morning, I did a small test. I noticed that a GH integer slider is being pick as a floating point with to digits that snaps every 0.25 . Is there a way to change that behavior?

Many thanks in advance and I can’t wait to see the future updates

This looks very cool.

What is the tech stack that’s making the UI?

Is this cross platform with MacOS?

Cheers

DK

Ah! Great find. I will put it on the list for the next version. Right now the UI slider assumes the same level of rounding as the GH slider, so it’s missed the fact the “Accuracy” was set to “Integer”. I’ll add this in the next version.

In the meantime, what you can do is use the Float accuracy, and set the rounding to 0 places.

Suimple_Int_Slider

2 Likes

The UI is entirely Eto Forms, so it should be cross platform. That said, I just tried loading it up on a Mac and it doesn’t seem to be working, so I’ll have to look into it. Probably something with how I’ve compiled it, but yeah once I work that out, should run on Mac as well.

3 Likes

How’s this even possible. I don’t think I’m smart enough to understand how interesting and cool this is :sweat_smile:

I think they’re right, Rhino is just a plugin for GH :smile:

I was going to say what about eto frameworks lol …

we the users, need this for constraint parametrics with loops :smiley:

Thanks Keyan, I built my own cross platform replacement for HumanUI last year to allow my plugin (written in GH and compiled using the script compiler).

I’m not 100% sold on my solution, I’ll keep an eye on developments here. This looks like a very nice approach to the problem.

If you want more input/advice on what is useful etc I’d be happy to chat.

Cheers

DK

Looking forward to testing this @krahimzadeh , I love the approach of simply grouping components on the canvas and having that become UI.

Makes it visually easy to understand how to layout your UI in an approachable and intuitive way.

Very cool, thanks for sharing this and all the work that went into it!

1 Like

Great work @krahimzadeh

Fantastic!!! Will play with it next week.

Thanks for this, It has a lot of potential. One thing I noticed is that panels used as list, i.e. Multi-line disabled, do not work as inputs. Is there any workaround for this?

I am looking forward to have it developed. Fantastic idea but, so far, with tons of limitations.


I need the T/F trigger button to be incorporated in panel (baking Push option is omitted too) and the text is not displayed properly. My dream would be to have an option to copy it’s content to clipboard.
Would be possible to have it as a docable panel?

Totally hear you, this was already high on my list of WIP features.. Unfortunately I don’t know a good workaround at this moment, other than maybe using “Split Text” after the input component, but a fix is coming soon!

2 Likes

Hi there - thanks for trying it out! Indeed, still a prototype. For the items you mention:

  • Yep, dockable panel coming soon.
  • Panel text should be an easy fix, thanks for pointing it out
  • Copyable content, also definitely an important feature

Regarding the T/F button. I am still thinking through the best way to approach this. In essence, the “Run” button at the top of each group already serves this purpose, it gives the user a button to send data to GH and trigger a new solution. There are some peculiarities with trying to trigger the actual GH button directly, but is definitely high on my list. Regardless, the safest way to do it is to go ahead and use a Boolean param instead. Here are some possible ways to go about this:

  1. You could break them up into three different groups, so there’s one “Run” button for each (those are the first 3), but the user has to check “true”.
  2. You could bundle them into one group, so they can choose which one to executre
  3. convert to a drop down, so the user picks which action to take, and then hits “Run”.

Of course this doesn’t match up to the spirit of ‘it just works’, but hopefully it’s a decent middle ground for now.

2 Likes

I’m OK with this solution, as long as it works.
Thanks!

Thanks, That was actually helpful, I did not know about the split text, I had it working with a C sharp script that does the same as split text, but the standard component is much simpler, thanks for that.

Hello there, continuing the conversation about Rhino inside Revit, I am on Windows 10 64, I tried Revit 2024 and 2022, Rhino 8 and 7, when I type Suimple in the command bar, nothign happens, no bug report, no glitch, just nothing.