Not being able to recieve a value in Revit though RhinoCompute

Hi all! I’m a bit stumped. I am building a C# script for an addin in Revit 2024. It uses rhino.compute to run a Grasshopper script (Rhino 8, .Net framework 4.8). The connection works but for some reason I am unable to retrieve the second area value. If I load the .json file I create with the C# script and run the gh script by hand it works fine. I suspect It could have something to do with the boolean toggle at the start of the gh script turning back to false before it can recieve AreaOverig when it runs through RhinoCompute but it might also be something else as I am able to also get the first GEOM value back if I add it to the output in the C# script. Anyone know why this happens and how I can fix it?

AreaGen.cs (8.6 KB)

BVOBerekening2.gh (23.3 KB)

image

I don’t know the answer to your question, but just wanted to point out that in the screenshot it looks like AreaWoon is getting the one from the group that is marked as Overig and vice versa.

Ah yeah, I tried to switch them around to see if it might have been the gh script. Though if I do that this happens:

So it seems as though it just only grabs a hold of the first context print, instead of both. Tried the same with context bake, and could only get the first context print and context bake of the script. The others returned 0 as well.