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.




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