Curtain Wall Grid


I am trying to create Revit curtain wall grid from lines/geometry in Rhino. I see this is still in WIP on the Rhino.Inside website, but if anyone’s done it successfully, I’d really appreciate the help.

I am struggling to get the interrupted grids like on the image below.




1 Like

Hey @danijelruso
Adding grid lines is quite a complex task due to the mathematical computation that is necessary to place the 2d line drawing of the grids over the actual geometry of the wall and calculate Grid insertion points. I have prepared an example here that I hope would be a starting point for your solution.

API Notes

  • Use the CurtainGrid.AddGridLine to create a new grid-line on a curtain-wall
  • Use CurtainGridLine.AddSegment and .RemoveSegment to turn the grid-line-segments on and off.
  • You can not turn off all the grid-line-segments on a grid-line
  • .AddGridLine allows for inserting grid-line-segments, however, you can not use .AddGridLine to insert multiple grid-line-segments on a grid-line axis. The first segment creates the grid-line and all other calls to .AddGridLine on the same grid-line axis will be ignored. A better way is to create the grid lines first, and then toggle (on/off) each grid-line-segment later.

Example Script

This definition uses two simple python components to Add grid-lines and later, remove the unnecessary grid-line-segments. It gets the grid-lines from a series of rhino lines, remaps them to the boundary and plane of the example wall:

Screen Shot 2020-06-08 at 18.30.08

Then it adds full grid-lines onto the curtain-grid. Later it analyzes the curtain-grid, grabs the grid-line-segments and by running a crude point-curve intersection logic, determines which grid-line-segments need to be turned off:

Screen Shot 2020-06-08 at 18.30.17

Hope this helps

add grid (418.4 KB)

Note: Revit model is in 2020


Hi @eirannejad

thanks a lot for sending the stuff through! It works great when revit/rhino units are set to feet, but once I change the revit/rhino units to mm or meters, I am not able to generate any gridlines (first python component gives null values). Am I missing something really obvious here? I have jumped into the coding world just recently, so apologies for asking silly questions.

Thanks again.


You need to manually correct the unit system between Rhino and Revit in that case.

i’m getting an error that i have to escape out of, any ideas on how to handle that? Thanks

This is one of the standard Buiolt in failures specifically here:

But a longer list of possible failures are here:

I always go here to decide what to do when Revit API seems to getting grumpy:

Does that help?

Thanks! I’ll take a look, but coding isn’t my arena… yet. The Added Gridline is working great & is more critical to a current workflow, deleting was just a wish & isn’t difficult to do manually.

@Rickson @eirannejad

This is great, I know this is setting the grids for a curtain wall element, but is it possible to apply a set custom grid setout to a curtain wall type. I am assuming probably not as they most likely will not all be the same.


Curtain Wall Types only allow grid configurations per their settings

@eirannejad and @danijelruso

I believe I am having the same issues with the units as discussed above.

If I use the script I have attached below, it works perfectly when I use a revit in feet and a rhino in feet. However, when I runthe script after I change both programs to the mm units- the python script returns null values as opposed to adding a grid.

Can you let me know how I should deal with the conversion? thankyou

testfile.3dm (49.2 KB) (54.5 KB) Inside_TestingFile.rvt (5.1 MB)

@ssw1 Okay see the attached please. I modified the python grid maker component to use the new Rhino.Inside.Revit api to convert Rhino units to Revit API units

# ...
from RhinoInside.Revit.Convert.Geometry import UnitConverter

# ...

    x = UnitConverter.InHostUnits(P.X, DB.ParameterType.Length)
    y = UnitConverter.InHostUnits(P.Y, DB.ParameterType.Length)
    z = UnitConverter.InHostUnits(P.Z, DB.ParameterType.Length)
    CGL = CG.AddGridLine(U, DB.XYZ(x,y,z), False)

# ...

add grid (404.7 KB)

Thankyou so much @eirannejad

1 Like

Hi @eirannejad and All

I have a further question of this issue in relation to updating the placement of grid lines.

So I have successfully added the grid lines and that all works great based on the advice above.

Lets say that once I have placed all my curtain panels, I then want to actually adjust these locations of these grids. I just want to understand the process of this.

What I know I could do is add new grid lines and then remove the old grid lines- this would seem the easy way. The issue with this is that i want to keep the curtain panels I have already added in (lets just say someone has already tagged them etc). The issue comes if the grid distances become too small, then the famly will perhaps no longer be able to make (lets say the new grid to grid gap is 50mm and there are two extrusions in the family that are atleast 100mm wide.

the way I see around this issue is if its possible to simply take an existing grid line and give it new XY location, as opposed to the adding and then deleting method I mentioned above.

Can anyone shed some light on this.

In the API the only methods I can see is either addgrline or removegridline

Hi @eirannejad
! I confuse about the graphical element .What is its input (is target curtain wall?)?
If it is curtain wall ,I need to have basic grid line of it ? As I use your code it does not have output data of the vertical and horizontal line .
Thanks a lot!

Hard to see what you’ve got going there, but to add a Gridline you need the CG, a boolean that determines U or V and a Point on the wall. I’m guessing you need to flip your Boolean.

Hello @eirannejad

I have tried your defintion add grid lines in latest RhinoInside version but it does not create the grid lines, it only previews the lines. from GH

Does it need an update or there is something i did wrong?

Constantine, That’s a pretty old definition and not sure what’s going on.

Try this simplified version.

Add Grid (7.3 KB)


This is great, it works! Thanks!
Will you include these components and even expand the Curtain Wall components more in the official package? I am thinking about the possibility to change Curtain Panel Types or other parameters. This way you could create patterns for the facade designs directly through Gh
And another question, i see that the Analyze Curtain Grid, gets the Glazed Panel type but i checked the Curtain Wall and i did not assign such panel.

Actually It looks that it is already possible!
And the Glazed type that comes as default its probably not relevant.

Correct, Changing the Element Type is via Analyzing Curtain Grid is the way to change out the panel types.

Most of these initial python components will eventually made into Rhino.Inside.Revit Components. The development of stable core code is the priority, with components being secondary additions as time permits.

1 Like