Hops error — Grasshopper

I’m not able to use my Hops component, I keep getting this error:
“Object reference not set to an instance of an object.: component “BuildingCurves” (aa4f4a6d-aaa5-4dcd-8198-0b5dbb0b9c07)”

My Hops component has the “Get …” inputs:

And the Group > “RH_OUT:name” outputs:

I’m new to using Hops, perhaps there was some update changing the workflow?

I figured it was something to do with the inputs. I removed the inputs (grouped, light blue), and connected empty mesh and empty curves component, saved and it worked. Not sure what exactly was wrong here.

1 Like

Hei Julian -

If you post the .gh files with the inputs, we could probably take a closer look at this.

Apart from that, the named-group-output procedure is now obsolete. You can use the Context Bake component to create the output.

The Hops documentation was recently updated:
https://developer.rhino3d.com/guides/compute/what-is-hops/

-wim

1 Like

@julian.riise You hit the nail on the head. The issue you were seeing was in fact happening because of the components shown in the blue groups. You have to remember that Hops is sending this definition (in JSON format) over to a headless version of rhino. That headless version of rhino doesn’t contain a document which contains any sort of referenced geometry. So when it runs and tries to find that geometry, you get an error that says that that component which contained a reference to a geometry found in the document couldn’t be found. If you remove those parameters (not the Context Get components but the ones passing the geometry into the Context Get components) then your file will run just fine because the file isn’t having trouble finding the geometry which doesn’t exist in a headless rhino instance. Does that make sense?

Just trying to get my head around “headless”…

Can the headless Rhino include reference geometry & layers etc?

No. The headless rhino document won’t contain any geometry. You can pass geometry into your function by using the Get Geometry context component and it will send any geometry that you want over to the rhino.compute server to perform calculations. But, it has to be passed in via the Get Geometry component or created via standard Grasshopper components inside the function. It can’t be referenced from a rhino document because that document doesn’t exist over on the rhino.compute server.

Thanks Andy!

Sorry to hijack the thread, but will the Get Geometry component also respect layer names?

Unfortunately, no. It’s only passing over the actual geometry (not any attributes). You could create another input (using Get String) and pass the layer name into the Hops function that way.

How about geometry that is already internalized into the .gh within a brep parameter, etc?

EDIT
Answered my own question. Yes, Internalized geometries work fine.

1 Like