Component: Get Object Names from Rhino

#1

Hi all,

Not sure if anyone would find this tool useful but I thought I’d share a small custom component that I have been using a lot lately in case it is of any help to other folks.

Quick Background: For some projects, in order to help manage certain data, we like to embed certain bits of info directly into the Rhino scene objects rather than do everything in the Grasshopper environment. While there are definitely times its nice to do everything in GH (if your running lots of scenarios, if things are changing dynamically, etc…), its seems that in many projects we’re working on in our office its been easier to manage the data within the 3D scene directly instead. For instance - for many models I’ve found I like to build the object names right into the Rhino scene, rather than add them in GH. But, in order to be able to pull that data from Rhino into GH though I had to make a quick component (not sure if this is already a tool someplace else in GH but I couldn’t find it back when I built this - so apologies if I’m duplicating here).

The tool is pretty straightforward, you just input a list of any Rhino objects and their GUID (you can use the GH ‘ID’ component to do that) and it’ll output a sorted list of the objects and their names:
(note that the ‘name’ field from the Rhino Properties is the info being pulled into GH)

I’ve used this tool to help me control / manage windows in our models mostly - for lots of our work I like to keep an eye on windows on a unit-by-unit basis for things like solar gain / transmission loss and having the names flow through the entire workflow automatically allows us to keep better control and review output better at the tail end of the simulation.

Especially for medium complexity models (where adding data on a per-window basis in Rhino isn’t a huge issue) this workflow seems to work well. Certainly if you had thousands of windows or something like that it’d be a drag - but for smaller buildings it seems to work ok. We’ve used this method to get names for Ladybug radiation analysis work, and it can also be used to get names for any of the Honeybee tools such as ‘addHBGlz’ which asks for names:

And as I said, this allows us to then keep good track of results on a window-by-window basis easier so that during design optimization we have an better handle on whats what in the model and can reconcile results with geometry faster:

Also its interesting to note that this same technique could actually grab a bunch of different info from the Rhino scene about an object and maybe most usefully for this sort of simulation modeling is that you could grab the ‘Details’ data. So - in theory - some set of data / tags could be added to the ‘Details’ on an object by object basis in Rhino, and then harvested / brought into GH automatically during the simulation phase. I’ve played with that workflow a little bit and it can work - though I don’t have a good clean component to share yet, but just by way of a simple example:

Use a quick Rhinoscript or Python script inside Rhino (just a simple setter and getter) to add some type of useful data to an object in the Rhino scene…

This data (text) then lives as ‘User Data’ in the ‘Details’ of that object and can be read at any time by GH or another script…

at any rate, in case that is of any interest or use to anyone I’ve attached an example Rhino/GH file with the simple name reader component here.

best,
-Ed

Object Names - Example.gh (8.5 KB)
Object Names - Example.3dm (61.2 KB)

6 Likes
#2

:100: Thanks for sharing! This is very true and this component definitely help. We should consider loading model from Rhino and dumping model into Rhino for Honeybee[+].