Extract Grasshopper component descriptions?

Is there a way to get all the GH component names and descriptions from a given tab’s worth of components as text? Or maybe even a way to cycle through all the installed libraries and report all components into a CSV?

Hey folks, any ideas on this one? Thanks for any input.

Edit: Maybe there’s a better way to phrase this. I’m looking to extract the visible parts of component descriptions, ideally for all the installed and available components. Name, Description, “group”, “tab” (sorry for crummy vocab). I’m hoping there’s a fast, smart way and I cannot come up with one, unfortunately.

I’m not entirely sure how one would crawl all the installed plugins etc. But you’re likely looking for the Description property. Here’s how one might extract that (plus Name and NickName) for objects on the Grasshopper canvas:


241214_ExtractCanvasObjectsInformation_00.gh (11.7 KB)

I wonder if the unofficial Grasshopper docs might also be relevant to your problem:

https://grasshopperdocs.com/completeIndex.html

Hang on, something like this might do it:


240213_ExtractAllObjectsInformation_01.gh (5.9 KB)

5 Likes

Wow. That works perfectly. gh.Instances.ComponentServer.ObjectProxies did it.

On my machine it ran at 99ms for 3592 components.

SystemInfo

Rhino 7 SR36 2023-12-12 (Rhino 7, 7.36.23346.16351, Git hash:master @ 11a364321297eb8cdb34405a3308d8911f58706d)
License type: Commercial, build 2023-12-12
License details: Cloud Zoo

Windows 10 (10.0.17134 SR0.0) or greater (Physical RAM: 16Gb)

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA Quadro P2000 with Max-Q Design (NVidia) Memory: 4GB, Driver date: 12-1-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.99
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port

Secondary graphics devices.
Intel(R) UHD Graphics P630 (Intel) Memory: 1GB, Driver date: 2-18-2021 (M-D-Y).
> Integrated graphics device with 3 adapter port(s)
- There are no monitors attached to this device. Laptop lid is probably closed

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 12-1-2023
Driver Version: 31.0.15.3799
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 4 GB

Rhino plugins that do not ship with Rhino
C:\Users\Armen\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\ColorPicker\6.0.0\ColorPicker.rhp “ColorPicker”
C:\Users\Armen\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\NVIDIADenoiser\0.4.3\NVIDIADenoiser.Windows.rhp “NVIDIADenoiser.Windows” 0.4.3.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RPC.rhp “RPC”
C:\Program Files\Rhino 7\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.36.23346.16351
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”
C:\Users\Armen\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\SectionTools\2021.4.30.511\SectionTools.rhp “SectionTools”

A thousand thanks, @AndersDeleuran!!! On to make my own offline help file.

2 Likes

That’s awesome, glad it helped :slight_smile:

I just had a closer look at what the script actually outputs. Maybe it makes sense to not include obsolete and hidden components (line 12) and sort the output by category and subcategory (line 18):


240214_ExtractAllObjectsInformation_00.gh (6.5 KB)

7 Likes

This is great work @AndersDeleuran I’m using it to create attributes keys and values in Elefront. Is there anyway we could also get the inputs and outputs labels for each component (particularly interested on the outputs to use for ‘keys’) For example for the ‘Point In Trim’ on your example I’d like to get the text label for the output: ‘Inclusion’. Then I can create a ‘Inclusion’ key for each point with their true or false value assigned. Thanks! Something like the below, would be great to connect a specific component with a side pipe to retrieve its specific data:

1 Like

You might need to modify this a bit to your requirements, but something like this (where we get/add the output parameters as a comma separated list of strings):


250411_ExtractAllObjectsInformation_00.gh (8.2 KB)

And welcome on board :slight_smile:

1 Like

This is awesome thanks you Anders! how would you go about just getting the data of one or several components but not everything on the bords, could it be under a specific group name or by plugin them? Thanks again!

You my also try metahopper which does not require any programming skills.

Thanks yeah MH is good but does not get you this far, plus I’m keen to learn PY etc, but thanks Martin!

1 Like

I was just away from the computer for a few days. Here’s one approach, where we filter by respectively a given assembly (i.e. the file name of a relevant .gha/.dll file, also extracted and added to the ComponentInfo now), and whether or not the component type is currently on the active canvas:


250417_ExtractAllObjectsInformation_00.gh (6.8 KB)

That might fit your requirements close enough. If not, we can further tweak it. Also, an excellent learning case here :snake:

Yeah, this is awesome, I’ve learnt a lot of coding with this excersice, thanks Anders for your generous help!

1 Like