Import .ghuser component

Hi @eduszh

there are a series of unified questions, I’ll answer them one by one.

User objects are not plug-ins. They are a different concept in the Grasshopper SDK. Right now, they are not part of NodeInCode, and therefore, they are also not part of the items available with the ghpythonlib.components library.

All Ladybug components share a lot of data and functions with one another. They do so without the usage of NodeInCode: as they are open-source, you can see how they achieve that. It’s mostly simple classes that provide that overall advanced functionality!

You can get access to their data types even in the EditPythonScript editor, but you will need to pass that data in some way to it. For example, by filling the scriptcontext.sticky dictionary with their values. They are not part of NodeInCode because they are not a component, however.

This was an original question that had to be addressed. If .ghpy files are able to use all ghpythonlib.components, then all ghpythonlib.components need to be loaded in order to load .ghpy’s. Unless an additional mechanism is added that fetches only the names, then replaces the stubs lazily with the functionality, it’s one or the other. I needed to choose one for the first release, and I picked .ghpys to use NodeInCode. (Not NodeInCode to include ghpys). I just added report RH-52131 for this wish.

2 Likes