I have just one question. I see how we can make versions of scripting components and mark old ones as Legacy, but I couldn’t figure out how to do that with components made out of Grasshopper definitions.
You can rename the new grasshopper file (e.g. MyGHSourceFile_v2.ghx) and add a new component in the project, pointing to this file. Mark the older one as Legacy.
I am running V8.11. I have several .rhp’s that I made using .gh files from 8.10 or earlier. They stopped working, so I opened ScriptEditor and it said I needed to update the underlying .gh files to the ‘current’ version for them to work. So my questions:
Will we need to open/save every .gh file in every .rhp to roll forward with new Service Releases?? Why are they not backwards compatible?
More importantly: How can we accommodate users on different SR’s? If one user is on V8.10 and another is on V8.11, how do we share common .rhp’s?
@declan Open the gh files in 8.11, save, and rebuild your plugins. They should would with 8.10 and >= 8.11 from then on. There was a few changes that needed to be made so rhinocode command can build projects outside of Rhino. This required a bit more info in the gh files and hence the “resaving” of the gh files.
OK - we can handle it as a one-time fix. So now the only issue is the icon editor which seems to have several issues now (bad timing since we need to suddenly recompile all the plugins).
If you have any other issues not mentioned there I’d really love to hear about them so I can get them fixed ASAP. (Ideally in new threads or the linked thread)
is this new process of building .gha plugins “limited” to Grasshopper definitions that include a Scripting component? Or is it possible to convert standard Grasshopper definitions (which don’t include Scripting components) into plugins?
In the second example you show in the video, I can see at least one Python scripting component in the midst of several standard components, and I notice your built plugin component produces several outputs, which seem not to be all linked to the Python component.
Hopefully I am not missing any newly released documentation, but it would be nice if you could provide a simple example file to understand how to handle Contextual Inputs and Outputs. It also seems that a special formatting protocol is needed to handle outputs (I can see something similar to how Hops is managed, with components grouped and named RH_OUT).
Thanks a lot,
Marco
PS. I am attaching a simple example project folder which does not run when loading in Grasshopper. I also include the error log in case you can reproduce. I just uploaded Rhino to version 8 SR12 (8.12.24282.7001, 2024-10-08)
Take a look at this documentation page. Look under Add Components. That section describes how Grasshopper components or definitions can be exported in the .gha plugin
Let me know if this does not makes sense and I can improve and provide more info here.
thanks, I had to downgrade and hold on to Rhino 7 for some time
Thanks for you link, I saw it, and I used it to test your workflow, which is straightforward and nice, but an error triggers when I load the compiled plugin in Grasshopper. I attached the .rhproj in the previous comment, in case you have 5 minutes to give it a try.
Here’s the error:
Error loading Grasshopper component | System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at RhinoCodePlatform.Projects.Rhino3DProject.GetAssemblyReferences(Type pluginType)
at RhinoCodePlatform.Rhino3D.Projects.Rhino3DProjectServer.PrepareScript(Rhino3DProject project, IGrasshopper1Script script, GH_Component component)
at RhinoCodePlatform.Rhino3D.Projects.Rhino3DProjectServer.TryDeserializeGHScript(InvokeContext context)
SRC13 no longer loads plugins published from ScriptEditor that worked fine in SR12. Here is the error message:
Rhino.Runtime.Code.Execution.ExecuteException: The given key 'command' was not present in the dictionary.
---> System.Collections.Generic.KeyNotFoundException: The given key 'command' was not present in the dictionary.
at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
at Rhino.Runtime.Code.Execution.ParamValueSet.Get[TValue](String name)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.RunAsCommand(RunContext context, GH_Document ghDoc)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.Execute(RunContext context)
at Rhino.Runtime.Code.Code.Run(RunContext context)
--- End of inner exception stack trace ---
System.Collections.Generic.KeyNotFoundException: The given key 'command' was not present in the dictionary.
at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
at Rhino.Runtime.Code.Execution.ParamValueSet.Get[TValue](String name)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.RunAsCommand(RunContext context, GH_Document ghDoc)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.Execute(RunContext context)
at Rhino.Runtime.Code.Code.Run(RunContext context)
Error occured running command "8d05c805-9474-41c1-b9e5-4de93f9aa50c" | Rhino.Runtime.Code.Execution.ExecuteException: The given key 'command' was not present in the dictionary.
---> System.Collections.Generic.KeyNotFoundException: The given key 'command' was not present in the dictionary.
at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
at Rhino.Runtime.Code.Execution.ParamValueSet.Get[TValue](String name)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.RunAsCommand(RunContext context, GH_Document ghDoc)
at RhinoCodePlatform.Rhino3D.Languages.GH1.Grasshopper1Code.Execute(RunContext context)
at Rhino.Runtime.Code.Code.Run(RunContext context)
--- End of inner exception stack trace ---
at Rhino.Runtime.Code.Code.Run(RunContext context)
at RhinoCodePlatform.Rhino3D.Projects.Rhino3DProjectServer.TryRun(InvokeContext context)