Grasshopper Doesn't Read Chunks on Components

Hello!

Our plugin stores information in the form of JSON as chunks on individual Grasshopper components. This information is not being read when we use our plugin in conjunction with Rhino.Inside Revit.

We have noticed that the Read(GH_IReader reader) function does not get hit when ‘Memory load *.GHA assemblies using COFF byte arrays’ is unchecked in the GrasshopperDeveloperSettings.

I’m guessing that when Rhino is started through Revit that this option is not enabled. Please confirm if there is a workaround to allow the reading of chunks when using Rhino.Inside Revit.

Thanks!
Anthonie

Found the solution, so I’m replying with the answer. Plugins can be forced to use the COFF settings through setting the GH_LoadingDemand enum at the top of the PluginInfo.cs file. Thanks to this post for pointing me in the right direction: How to define per-GHA loading mechanism? - Grasshopper

This is the line I added above the namespace definition in my PluginInfo.cs file:
[assembly: Grasshopper.Kernel.GH_Loading(GH_LoadingDemand.ForceCOFF)]

Hope this is helpful for anyone else having GH_Archive chunk loading issues for their GH plugins.

-Anthonie