Grasshopper "Reference Layer" doesn´t find Rhino layers after reopening

Hey there,
completely new to Grasshopper…
trying to fix a broken link between Grasshopper and a Rhino file.

I’ve followed Kirdeikis´ great tutorial for using Rhino for architecture (https://www.youtube.com/watch?v=eBCJwGsB30Q). He also explains how to generate a list of room sizes using Grasshopper (starting at 7:29:00 in the video).
For that, he uses the eleFront “Reference Layer”. A panel with the respective layer name is connected to its input. A couple “modules” later, we get a panel with the room sizes.

After closing and reopening both the Rhino and Grasshopper file (also renamed the Rhino file), the connection between the two seems to be lost. There´s no data at the output of the “Reference Layer”.

How can I get the Grasshopper file to retrieve data from my latest Rhino file again?

Here´s a screenshot. The lower strand wasn’t working as wished yet but first I need to fix the file connection anyway…

Thanks a lot for any input!

If you are using Rhino 8 I would encourage you to use native components instead of elefront plug in.. It was a great tool, but now rhino supports all its functionality natively.

Use Query Model Objects component

But i think in your case you just need to check the name of the layer carefully, and if the geometry you are trying to pass to grasshopper is really on that layer.

Great thanks!
I simplified the layer names and now it works!

Could you guide me on how to use the Query Model Objects component?
I want to extract two things from the 3D model:

  1. closed polylines layer “Räume-Outlines” (these are for calculating the m² per room)
  2. texts on layer “Räume-Bezeichnungen”, each text sits inside one of the closed polyline (these are the room names)

here’s a screenshot of part of a floor plan, polylines are neon green, text are dark green:

What I want to achieve: A list of all rooms with their name and respective floor space (m² ).

Thanks again!

See attached example:

RoomArea.gh (13.5 KB)

RoomArea.3dm (4.0 MB)

Thanks a lot!
I´ll try to work from there on once I find enough time. And might get back with a couple questions if needed.

Just realising that I might need to dive a wee bit deeper than anticipated into how Grasshopper works to get this done… rather than just mindlessly following along the tutorial.

One basic question:
How does Grasshopper link to a Rhino file? Is it always retrieving data from the currently opened Rhino file? So there´s no fixed link between a Rhino file and a Grasshopper file?

Again, thanks a lot for your input!

GH file is always linked to open rhino file. You can open other rhino file and gh definition will try to get the curves from layers in this new file.

Thanks a lot,
I did get quite a bit further!

But still face two issues…
I’ve now got Grasshopper to output a list with all rooms with their respective room area.
However, the list is neither ordered by story (see 1.) nor by room number (see 2.).
Find attached my Grasshopper file and screenshot of Rhino model / floor plans.

  1. Sort by story
    The building I’m drawing has 5 stories. Eventually, I´ll export each plan onto one separate A3 page, so I only want the room areas of the respective story on each page (for example, the ground floor plan should have a list of only the rooms that are on the ground floor).
    I´ll basically need to have one separate list per story.
    I can think of a couple ways to achieve this but don´t know the Grasshopper linguistic well enough to do so by myself… I could:
    1. A) draw a big rectangle around each floor plan and include it into the script for that specific story. The script would than only include the rooms that are inside that rectangle. Then, I’d copy that script for each story, each with their own rectangle.
    1. B) rename all room names by adding a prefix per story. This would be a little confusing though (too long a number per room). Also, all rooms would just end up inside one big list which I´d have to somehow “cut” into pieces per story.
    1. C) any other ideas?
  1. Sort by room number
    This should be quiet straight forward but I can´t figure out how to sort the list by room number. Of course, this must not mess up the correct correlation of each room number/name with its respective room area.

Again, thanks so much for your help!

RoomArea FR.gh (25.4 KB)

This is the way I approach floor plans too, just make a frame for each floor plan and use the ‘Point in Curve’ component

You should avoid this. In grasshopper you are meant to use Data Trees and not make multiple copies of the same script.

For this you should use the Model Object data type. You can store the area and room number as User Text attributes and then sort the data by Room Number using the ‘Order Content’ component.

I can make a basic script for you if you share a Rhino file

Thanks for your offer, it’d be great if you could write a basic script (including room lists per level) for me!
Also, is there a way to exclude certain things from that list? For example I have written “Luftraum” (meaning air space) in one space which is just the air space of a two story high room. I woudn´t want that in my room list obviously. Maybe it´d help to put that text “Luftraum” onto another layer?
One more thing: In the attic, there´s two rooms with chimneys going through them. Can I subtract their areas from the respective room?

I’ve just extracted the 2D drawings from my 3D model so you can set the Grasshopper script up on that reduced Rhino file.
Attached are the Rhino file (reduced to 2D) and the Grasshopper file in the current state.

Thanks a lot!

260314_M12 Teilungsplan export 2D.3dm (5.4 MB)
RoomArea FR M12.gh (19.6 KB)

Step 0:
I added a layer called ‘kyuubimode::plan frames’ and made a number of rectangles. Each is given a name in the properties from the bottom. -1 is basement, 0 is ground, 1 is first floor and so on

Step 1:

Since you need cut outs in the rooms, we cannot use Closed Curves only. Instead we will first make surfaces for each room with the chimney cut outs. These surfaces are in the ‘kyuubimode::room surfaces’ layer


A Surface is capable of having holes whereas curves are unable to.

Step 2:
Query the room surfaces and annotations in grasshopper. Since we are using surfaces, we can use the ‘Collision One | Many’ component to see which texts, intersect with which surface. I do this by drawing a line at each text in the Z direction and use that as the collision object.

Note: Your geometry is not on the world XY plane so we need to use the ‘project’ component before doing this. After the room surface list is partitioned, we calculate the area and store it as user text on the annotations using the ‘User Text’ component. We can then trim the data tree.

Step 3:
Query the plan frames. Use the ‘Order Content’ component. Set the Key to ‘Name’. This will sort your list in the ascending order of the names. Use ‘Point in Curve’ to partition the list of room surfaces as per the floor. Save the floor value as a user text on the annotations using the ‘User Text’ component. Trim the data tree.

Step 4:

Back in Rhino, add an ‘exclude’ key on text objects you want to be removed. Lets say these two rooms.


Using the ‘User Text’ component, retrieve this value in grasshopper. Combine with False and dispatch the list to remove these two texts.

Step 5:
We are done! All that’s left is to extract our values and sort the list.
First we will use a ‘Group Content’ component to partition our list by floors in an ascending order. Then retrieve the user text values and format the text in the way you need.

260314_M12 Teilungsplan export 2D edited by kyuubimode.3dm (3.2 MB)
script for fabian.gh (20.5 KB)

Woah, thanks so much for your efforts!!
Sorry, just now found the time to come back to this project.

I’ve tried to implement the Grasshopper script into my actual 3D model (adjusting the respective Layer names) and pasting your planes (room surfaces) and plan frames along.

Unfortunately, I´m still running into two issues.

1.) the list now misses the measured areas. It only shows 00m² for all rooms listed.

I´m somehow thinking, that there´s an issue within the process of “colliding” (Collision One / Many) the texts with the respective surfaces via lines.
I think so, because there´s no points shown within my model whereas they are in yours.

My model:

Your model:

2.) Lastly, I´d like to sort the list by room number (starting with 0.01, 0.02,… going through 1.01, 1.02,… to 8.01, 8.02,…).

Again, thanks so much for your efforts!
All best, Fabian.

Hi Fabian,

Could you share your model? if not the whole model then atleast some example part so I can see what the issue is?

If you are unable to share the model, you can just internalize data at this part of the script so I can troubleshoot the issue.

You can do this by adding this a user text key and using the ‘Order Content’ component and order them by the key you add.