Getting component guids for **all** components available to user

Hello all,

I’m struggling with this one and wondering if anyone out there could help at all.
I can get the guids of any components that are on the canvas by simply using Document.ActiveObjects() of course and getting the componentguid, assuming they are indeed components…

…however I was wondering if there is a quick way of getting a list of all component guids available to the current user (i.e. standard issue + any installed user libraries and even user objects if possible)? Possible routes in are evading my grasp, hence turning for help. The idea is to place a random component on the canvas, and to do this I need to compose a list to pick from.

Anyway, any help much appreciated.

Many thanks,


For anyone obscure enough to need a similar thing, I have found the answer through a bit of trial and error. You can access the tabs, panels, items and associated component IDs thus:

Guid myId = Instances.ComponentServer.CompleteRibbonLayout.Tabs[1].Panels[0].Items[0].Id;
GH_Component myComponent = (GH_Component) Instances.ComponentServer.EmitObject(myId);
this.GrasshopperDocument.AddObject(myComponent, false);

Best, John.

InstancesComponentServer gives access to all loaded objects as proxies. The tabs may not actually include a bunch of obsolete or otherwise hidden components. Or maybe that’s what you want?

A proxy is just enough information about a component/parameter to show it on toolbars and instantiate it, but it doesn’t contain an instance of the component in question.