Rhino 8: Building component settings

Hi,
In Rhino 8, when building a Grasshopper component, how do we set the icon, category, and subcategory?

I’m not sure I understand. For most components, the way you would construct them hasn’t changed from previous versions. If your component inherits from GH_Component then you can set those properties in the constructor like this:

public class Component_Circle : GH_Component
{
    public Component_Circle()
      : base("Circle", "Cir", "Create a circle defined by base plane and radius.", "Curve", "Primitive") { }

    protected override System.Drawing.Bitmap Icon
    {
      get
      {
        return CurveComponents.Properties.Resources.Circle_24x24;
      }
    }
}

In the example above, the constructor of the GH_Component base class calls for the following arguments: 1) Name, 2) Nickname, 3) Description, 4) Category, 5) Subcategory. And then there is an override getter for the icon. Note, this example is not a full class for a valid GH component… but hopefully it helps explain the properties you asked about.

Hi @AndyPayne
I ask about the new building tool in script editor

I tried to modify the settings in Visual studio but i got many errors,
First the png icon added to Resources is recognized as byte.
I convert the icon but other errors appears:

image

image

image

Ah. I see. I’m going to pass this along to @eirannejad.

I recreate the project and set the name to Params and this change the Category of the component
but we can’t change the component name!
Also there is no way to change the input name, c# and python components don’t accept input name with spaces so how we can change them when building the component?

image

image

After building the component i notice that the input type changed from Text to Time

image

image

Ok thanks! this should be fixed in Rhino 8.3 RC next week.

1 Like