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)”
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.
@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?
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.
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.