Build plug-in with the ScriptEditor

Hi,

I was wondering if there are any guides on how to build and compile a simple “Hello World” plug-in from a .rhproj with the ScriptEditor.

When I publish the following project I am unable to load the HelloWorld.rhp and execute the command CMDHelloWorld.

Hi @AMG did you see this video by @eirannejad ?

Hi, yes I have seen it. Not sure what I am missing.

Hi @AMG, what happens if you drag & drop the *.yak file instead of the *.rhp file ?

_
c.

hi @AMG what @clement suggest should work. I’ll ask if loading rhp’s like it can be done on Windows is possible

Using the *.yak works. What is the difference between the .yak and .rhp?

Hei Håvard -

A .yak file is basically a .zip file where the extension has been changed to .yak. It contains / can contain an .rhp file.

Further reading: Rhino - The Anatomy of a Package
-wim

I’m trying to export my Grasshopper definitions as a Grasshopper plugin. I’ve followed the video, but I don’t have the GHA file in my output folder as expected.
Thanks for helping,
Roy

Someone from MCNEEL could help?

Hi Wim,
do You have some answer to my following question?
Thanks,
Roy

Hi Roy -

No, I don’t. @eirannejad probably has more information about this.
-wim

@lopez Would you mind sending me your .rhproj file. The screenshot does not tell me much

Hi Ehsan,
here it is the file.
Thanks,
Roy

gh_plugin.rhproj.zip (913 Bytes)

Any news?

Is someone from McNeel? Is it not an important issue to solve? Thanks

Hi @lopez. Yes I am here. I’m sorry there is been a large list of bugs and posts that I had to go thru. I will look at this right now

@lopez I only see that you have added gh_plugin.gh to the project but you have not included that in the zip file so I can not see what is inside.

In order for the script editor to create Grasshopper plugin, you would need one of these two conditions. Either:

  • Grasshopper definition has at least one Script component in it. Each Script component turns into one Grasshopper Component in the GH plugin
  • Grasshopper definition has at least one Contextual component. In this case, the full definition turns into one Grasshopper Component in the GH plugin

Take a look at this video for more info:

Hi Ehsan,

Thank You for your reply.

My plugin is made mainly with Grasshopper clusters, so I can easily export each command as a GH user command. However, I need to create a single plugin with all the commands to share it. Is this possible?

Thanks,

Roy

You can. The Grasshopper definition must contain contextual componets if it needs input. You can add a Grasshopper file under the Commands/ in a project as well. Edit the item in project explorer to customize name, icon, etc.

I’m trying following your video to create a grasshopper plugin with my clusters but it doesn’t work. Can You please share an example with a simple grasshopper cluster? Thanks, Roy