Using Model Lines in Revit to guide Grasshopper Geometry


Is there a way to extract a model line within Revit for use in Rhino and Grasshopper via Rhino.Inside? I see a component for extracting ‘edges’ but it would be far more useful in my scenario to use a couple model lines I’ve drawn. I attempted first to Logic+Filter using Model>Lines picker and Level filter with no success. It’s very likely I’m missing something… Any help would be appreciated.

Hi Rocky,

Model lines have a Work Plane parameter which indicates the level/location, so the Level filter wouldn’t work in this case. (9.1 KB)
(if its a newer version of RiR than you are running it might open with errors, but a save will make things right)

1 Like

Thanks for the quick response! So I suppose using this method I could name the model lines a unique name and pick from the categories list. This is super helpful!

The Line Style parameter might be the way to go here if you are going to control it that way.

1 Like

Wondering if there is a way to do the reverse of this? I’m looking to create Revit Model, or Reference lines from Rhino or Grasshopper curves. Is this possible?

There is a component named “Add Model Line” which you could use for that.

Thanks Mohamed. Didn’t realize that had been added but exactly what I needed.

Hi all! this is exactly the post I was looking for. I tried using the definitions provided however Rhino Inside seems to have updated since. Is there another updated way to select multiple model lines from Revit? can’t find a solution for it, thanks!!

Hi Federico,

Can you provide more info, what isn’t working for you? There are a number of ways to get and sort, a small example of your data and what you are trying to accomplish would be helpful. Thanks.

Hi Japhy,

thank you for your reply! I am trying to accomplish something quite simple which is referencing model lines from Revit without having to manually select them all each time by using the line type as a filter. I am then using model lines to organize and place families through Grasshopper.

I tried following your script however some components might have changed in time (for example the “inspect elements” has no output). If I manually select the lines from Revit I get “model lines”, but If I use the category picker I only get “detail lines”.

If you have any alternative method that would be great, thanks!

The inspect component is very dynamic. Place then right click to expose available parameters on the elements input.

Choose your outputs then hide unconnected (not required)

You can also use Shift to Expand, Cntl to remove unconnected , vs right click Show all/Hide

1 Like

Many Thanks! that is much clearer, I am quite new to Rhino inside so this is very helpful.

For some reason, I still cannot see the Work Plane parameter for the lines so I’ll have to figure that out somehow. You can see in the background the model lines from Revit but it still doesn’t detect any in GH

If you have Model and Detail lines (view dependent) in a view and select you will only get the common properties. This is what you are getting in the Inspect Element. Like the Revit UI filter you will need to create some logic in your definition to get exactly what you are looking for.

A lot depends on what your particular needs are, as well as how you’ve organized things. One way to just get model lines is to query a 3D View for Lines Category.

1 Like

Perfect! that is what I was looking for, a quick way to select Lines in the active view (or a specific view). For the moment this works well and I can refine the script as I move forward. Thank you very much for your time!

Hi @Federico_Lorenzon,

‘Element Host’ should give you the element were your curve is hosted.
If you need the ‘Work Plane’ element just cast to ‘Work Plane’ like this.
Casting to ‘Plane’ also works.

The selected one is hosted on a wall while the other on a Level.

1 Like

Many thanks Kike! also that can work:)