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.
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:
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.
I wanted to write a component that would generate a random component on the canvas, so it was actually beneficial in some ways to not include obsolete or hidden components. A kind of grasshopper version of discovering components you never knew existed, or to generate an idea dada-style.
Ah very nice. Yes I tried to do this a few years back with Embryo (David might remember my obscure questions), but I never quite finished it so it was really ‘usable’. It took components from a specific part of the campus rather than randomly though. I then switched my attention to the Biomorpher plugin. I must return to it at some point and finish things off properly. https://www.food4rhino.com/app/embryo