Grid lines are used to indicate where building elements are placed, mostly aligned with the primary structural elements. They help organize your design. After placing them, each of the grids will indicate a coordinate which will be shown inside the Grid Bubble. These Grid Bubbles can be turned on or off in Revit, depending on your needs.
In Revit, grids are categorized as annotation elements. The grids are mostly placed vertically and horizontally. When used on sheets, you often want to turn all grid bubbles on or off. This can be time-consuming, but luckily we can automate this!
This article will show you how to turn off multiple grid bubbles with different methods but in particular how to automate this with the help of Dynamo Revit.
Grid Bubbles
To Show or Hide Grid Bubbles there are mainly two methods that are available in Revit. The first method is to show or hide the grid bubble individually, which is a tedious and time-consuming task. The second method is by using the Type properties, which will turn off all grid bubbles simultaneously. With this method, you have to work with different types, making you less flexible.
But what if you want to be more flexible with the Grid Bubbles? There is a way to turn all Grid Bubbles on or off simultaneously, without changing the type properties. This can be done by using a Dynamo script in Revit.
Before we continue to explain the Dynamo Script to Show and Hide Multiple Grid Bubbles, we start explaining the methods that can be used in Revit self.
Method 1 – Graphically and Individually
In Revit, it is possible to control the Grid Bubbles at both ends of the grid line. In Non-Plan views, such as elevations and sections you can control the Top and Bottom Grid Bubbles.

To Show or Hide the Grid Bubble of a grid line Individually, it is possible to do this graphically inside a view.
- Open any view that displays the grid lines
- Select the grid line that has to be modified
- Next to the Grid Bubble you will see a check box, Uncheck the check box to hide the Grid Bubble, or select the check box if you want to show the Grid Bubble.
- Repeat this process for each of the grid ends and grid lines

Tip
If you can’t find the check box to Show or Hide the Grid Bubble, try to zoom in or out to see it properly.
Method 2 – Type Properties
When it comes to turning off Multiple Grid Bubbles at once in Revit, there is the possibility to control this by using the Type properties. With this method, you can make multiple types, allowing you to control the Grid Bubbles.
- Open any view that displays the grid lines
- Select any of the grid lines
- Go to the Properties browser and click on Edit Type

- Optional: create a new type by Duplicating
- Now choose whether you want to show or hide the Grid Bubbles at each end > Click Apply/Ok

- Plan View Symbols End 1: To Show (check) or Hide (uncheck) a Grid Bubble at the start point of the grid line.
- Plan View Symbols End 2: To Show (check) or Hide (uncheck) a Grid Bubble at the endpoint of the grid line.
- Non-Plan View Symbols: To Show or Hide a Grid Bubble in views such as Elevations and Sections. In this case, you can choose from Top, Bottom, Both, or None.

Dynamo – Turn Off Multiple Grid Bubbles
Now that it is clear how to turn the Grid Bubbles on or off with the methods in Revit, let’s take a look at how to automate this with the help of a Dynamo Script. The script can be used to control the Grid Bubbles in a single view, but also with multiple views that are placed on the sheet.
Dynamo – Script
Below you will see an overview of the Dynamo script. I have divided the script into five parts to make clear what each part does. Also, the script contains a part that is made in Python.
The script requires the installation of the following package:
- Clockwork for Dynamo 2.x

1. Get Active View
The first part of the script checks whether a single view or sheet is opened. A sheet mainly contains multiple views. The Active View is controlled by a Boolean which serves as a switch to turn the Grid Bubbles on or off.

2. Collect Single View
When the Active View contains a single view, this will be collected in the list. The View Type will read out what kind of view it contains. This will be used to create a filter (in part 4).

3. Collect Multiple Views
When the Active view contains a sheet, then it will read out which views are placed on the sheet. These views are filtered into three types: Elevation, Floorplan, and Section. Notice that these are the ones that contain grids. You can modify this code block if you only like to control the grid bubbles of an elevation, for example. The filtered views are placed in a new list.

4. Filter Whether Single or Multiple Views Get Through
When the Active View in part 1 is reading out: DrawingSheet (which means that there are multiple views) then it will filter all the views that are placed on the sheet. Otherwise, it will only let the single view through.

5. Turn On/Off Multiple Grid Bubbles
When the views are collected they go as input through the Python script. This script will loop through each view and collect all grids.
The first grid that is found, is used to determine if the grid bubbles are on or off. From that point, it will do the opposite to all other grids. For example, when the first grid is on, it will turn off all grid bubbles in the view, and vice versa

# Load the Python Standard and DesignScript Libraries import clr # Import DocumentManager clr.AddReference("RevitServices") from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager #Import RevitAPI clr.AddReference("RevitAPI") from Autodesk.Revit.DB import * # The inputs to this node will be stored as a list in the IN variables. doc = DocumentManager.Instance.CurrentDBDocument uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument views = UnwrapElement(IN[0]) getfirstview = views[0] annotationelements = list() TransactionManager.Instance.EnsureInTransaction(doc) # Variables collgrids = FilteredElementCollector(doc, getfirstview.Id) filtgrids = ElementCategoryFilter(BuiltInCategory.OST_Grids) grids = collgrids.WherePasses(filtgrids).ToElements() firstgrid = grids[0] # Check if first grid is turned on/off. x = firstgrid.IsBubbleVisibleInView(DatumEnds.End0, getfirstview) # Gather all grids per view. for view in views: collector = FilteredElementCollector(doc, view.Id) filter = ElementCategoryFilter(BuiltInCategory.OST_Grids) grids = collector.WherePasses(filter).ToElements() if x == True: for grid in grids: grid.HideBubbleInView(DatumEnds.End0, view) grid.HideBubbleInView(DatumEnds.End1, view) out = "Bubbles are Hidden" else: for grid in grids: grid.ShowBubbleInView(DatumEnds.End0, view) grid.ShowBubbleInView(DatumEnds.End1, view) out = "Bubbles are Shown" annotationelements.append(grids) TransactionManager.Instance.TransactionTaskDone() doc.Regenerate() uidoc.RefreshActiveView() # Assign your output to the OUT variable OUT = (annotationelements, out)
The script’s output will be grids with or without Grid Bubbles inside the view(s). The Boolean can be changed to True or False to toggle between on or off. Also, the output will show a text that says: “Bubbles are Hidden”, or “Bubbles are Shown”.


Wrapping Up
Grid lines are used to indicate where building elements are placed. This will help you to organize your design in Revit. Each grid will have a unique number or letter inside the grid bubble. Within Revit, you can show or hide these grid bubbles. You can do this individually for each line, but as you might have noticed, this is very time-consuming. The other method to do this simultaneously is by using Type properties, which makes you less flexible.
Nonetheless, it is possible to turn the grid bubbles on or off simultaneously with the help of Dynamo, which makes you more flexible and faster.
I hope this article helped you to understand how to turn off multiple grid bubbles, and how to do this with the help of a Dynamo script. If you have any questions, just drop a comment below.
Hello Ralph,
Thank you for the informative post! I’m new to Dynamo and trying to find a script that only shows grid bubbles on the left and top sides of a view. Is there any way you could modify your script to do this? I would really appreciate it!
Thank you,
Sharoon
Each Grid has its start and end points. So when you model each grid, from Left to Right and from Top to Bottom the start points will be at the Left and Top. With this method you can change the Python script, you only have to remove line 44, “grid.ShowBubbleInView(DatumEnds.End1, view)”. When you toggle the True/False button now, it will only Show or Hide the Grid Bubbles on the Left and Top. The Grid Bubbles on the Right and Bottom will stay hidden.
Thanks for the help, Ralph! I’m almost there. I removed line 38 in the “else” loop, “grid.ShowBubbleInView(DatumEnds.End1, view)”. However, when I toggle True/False, the bubbles show/hide on the LEFT and BOTTOM. I believe this means my start points are at the LEFT and BOTTOM. I know I need to modify the script to show the start point of the left to right grids and the end point of the top to bottom grids but I’m not sure how to do that. Could you help with this?
Thank you,
Sharoon
I recommend consistently modeling the grids from left to right and top to bottom. Then you can change the ends of the grids to your requirements inside the script. For now, you can try to rotate or mirror the grids (the fastest way). There is no easy way to change the script individually for this.