How to Turn Off Multiple Level Bubbles in Revit

Levels in Revit are used as a reference for level-hosted elements, like walls, floors, roofs, and ceilings. The Levels help you organize the height of the design and elements. Each building story inside your project should have its Level. The height of each Level will be shown at the end of each extent, which is called the Level Head/Bubble. We can turn these Level Bubbles on or off in Revit, depending on your requirements.

In Revit, Levels are categorized as annotation elements and are finite horizontal planes. The Levels are placed inside an elevation or section view. When Levels are visible in the elevations or sections placed on sheets, you probably want to turn them on or off depending on the space and visualization. It can be a time-consuming job, Luckily, we can automate this!

In this article, we are going to take a look at how to turn off multiple-level bubbles with various methods. But in particular, how to automate this with the help of Dynamo Revit.


Learn more about the basics of Levels in this article: Levels in Revit – What you need to know

Level Bubbles

In Revit, we have the possibility to Show or Hide Level Bubbles by using mainly two methods. These methods are built-in and can be used without the interference of any add-in. The first method to Show or Hide the Level Bubbles is individually clicking on the Hide Bubble checkbox, which can be time-consuming and annoying. The second method is by using the Type properties, which can turn off all levels simultaneously. This method can be very useful when you are using different types, but the downside of this is you are less flexible.

There is a solution to turn all Level Bubbles on or off simultaneously, without changing any of the type properties or touching the checkboxes. The solution for this is by using a Dynamo script in Revit.

But before we dive into the Dynamo Script on how to turn on or off all Level Bubbles, let’s take a look at the methods which Revit has at its disposal.

Method 1 – Graphically and Individually

Within Autodesk Revit, it is possible to control the Level Bubbles at both extents of the line. This means that you can Show or Hide the Level Bubble on the right or left side of each Level.

turn off level bubbles revit

To Show or Hide the Level Bubble Individually, it is possible to do this graphically inside a view.

  1. Open any view that displays the Levels (elevation or section)
  2. Select the Level that has to be modified
  3. Next to the Level Bubble you will see a check boxUncheck the check box to hide the Level Bubble, or select the check box if you want to show the Level Bubble.
  4. Repeat this process for each of the Levels on the right and left side
turn off level bubbles individually
Show or Hide Level Bubble individually


If you can’t find the check box to Show or Hide the Level Bubble, try to zoom in or out to see it properly.

Method 2 – Type Properties

When it comes down to turning off Multiple Level Bubbles simultaneously in Revit, there is a possibility to control this by using the Type properties. With this second method, you can make multiple types, which allow you to control the Level Bubbles. Follow the steps below:

  1. Open any view that displays the Levels (elevation or section)
  2. Select any of the Levels
  3. Go to the Properties browser and click on Edit Type
revit turn off multiple level bubbles
  1. Optional: create a new type by Duplicating
  2. Now choose whether you want to show or hide the Level Bubbles at each end > Click Apply/Ok
level type properties
  • Symbol at End 1 Default: To Show (check) or Hide (uncheck) a Level Bubble at the start point of the Level.
  • Symbol at End 2 Default: To Show (check) or Hide (uncheck) a Level Bubble at the endpoint of the Level.
revit turn off multiple level bubbles
Turn off multiple level bubbles by using type properties

Dynamo – Turn Off Multiple Level Bubbles

With the two methods described above, it is clear how to turn on or off Level Bubbles with the abilities in Revit. Now, let us take a look at how to automate this with the help of Dynamo. The script we are going to take a look at can be used to control Level Bubbles in a single view or multiple views on a sheet. In addition, to show or hide the Bubbles, I have added the possibility of controlling them independently. This means that you can Show or Hide all Level Bubbles, but also Show or Hide the Bubbles on the right or left independently of one another.


I recommend consistently modeling the Levels from the Left side (start point) to the Right side (endpoint).

Dynamo – Script

Below you will see the overview of a Dynamo script. I have split the script into five parts to explain what each part is doing. Besides that, there’s a part that’s written in Python.

The script requires the installation of the following package:

  • Clockwork for Dynamo 2.x
dynamo turn off multiple level bubbles

1. Get Active View and Select Bubbles

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 allows you to refresh the active view. The Left and Right level Bubble Show / Hide boolean allows you to choose which bubbles to Show or Hide.

For example, when both booleans are false, all bubbles are hidden. When the left boolean is true, it shows the bubbles on the left, etc. There are a total of four options available with this script.

  • Level Bubbles Left: off, Level Bubbles Right: off
  • Level Bubbles Left: on, Level Bubbles Right: on
  • Level Bubbles Left: on, Level Bubbles Right: off
  • Level Bubbles Left: off, Level Bubbles Right: on
dynamo get active view and select bubbles to show or hide

2. Collect Single View

When the Active view in part 1 contains a single view, it will collect this in the list. The View Type will read out what kind of view is used (floorplan, elevation, or section). Later on, this will be used to create a filter in part 4 of the script.

collect single view dynamo

3. Collect Multiple Views

Whenever a sheet is an Active View, the script will read out which views are placed on the sheet. The views will be read out by the View Type node and then filtered into elevations and sections. These types of views can contain Levels.

You can change the code block if you only like to change the Bubbles in an Elevation, for example. The filtered views will be placed inside a new list.

collect multiple views

4. Filter Whether Single or Multiple Views Get Through

The script will check if there are single or multiple views within this part. When the View Type (in part 2) reads out DrawingSheet, it will let the multiple views through and put them into a new list. You can control the level bubbles on all views simultaneously with this method.

filter views dynamo

5. Turn On/Off Multiple Level Bubbles

In part 5, the filtered views will go into the Python script. You can put the filtered list into the “IN[0]“, and then the script will loop through each view and collect all levels. The “IN[1]“ and “IN[2]“ are used as input for Bubbles on the Right or Left side.

When you run the script, you can toggle between True and False for the Left and Right Bubbles. To refresh your settings, you can click on Run again in Dynamo. If You want to change the Active View, Toggle the True/False for the Active View in part 1.

revit turn off multiple grid bubbles with dynamo
# Load the Python Standard and DesignScript Libraries
import clr
# Import DocumentManager
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#Import 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])
leftbubbles = UnwrapElement(IN[1])
rightbubbles = UnwrapElement(IN[2])
annotationelements = list()
# Gather all levels per view.
for view in views:
	collector = FilteredElementCollector(doc, view.Id)
	filter = ElementCategoryFilter(BuiltInCategory.OST_Levels)
	levels = collector.WherePasses(filter).ToElements()
	if leftbubbles == True:
		if rightbubbles == True:
			for level in levels:
				level.ShowBubbleInView(DatumEnds.End0, view)
				level.ShowBubbleInView(DatumEnds.End1, view)          
				out = "Bubbles on the left and Right are Shown"
		if rightbubbles == False:
			for level in levels:
				level.ShowBubbleInView(DatumEnds.End0, view)
				level.HideBubbleInView(DatumEnds.End1, view)
				out = "Bubbles on the left are Shown"
	elif rightbubbles == True and leftbubbles == False:
		for level in levels:
			level.ShowBubbleInView(DatumEnds.End1, view)
			level.HideBubbleInView(DatumEnds.End0, view)          
			out = "Bubbles on the right are Shown"
		for level in levels:
			level.HideBubbleInView(DatumEnds.End0, view)
			level.HideBubbleInView(DatumEnds.End1, view)
			out = "Bubbles are Hidden"              
# Assign your output to the OUT variable
OUT = (annotationelements, out)

The script’s output will be Levels turned on or off in the view(s) depending on your requirements. You can change the boolean on the Left and Right sides to False (Off) or True (On). Besides that, you can put a node to the output to read out what you just changed. There are four outcomes:

  • Bubbles are Hidden
  • Bubbles on the left and Right are Shown
  • Bubbles on the left are Shown
  • Bubbles on the right are Shown
show or hide level bubbles
Level Bubbles Left: off, Level Bubbles Right: off

Wrapping Up

Levels in Revit are used as a reference for level-hosted elements. These levels can help you organize the height of the design and elements. Each building story should have its Level. The heights of the Levels will be shown in the Bubble at the end of the extent. In Revit, you can show or hide these Level Bubbles individually by clicking or simultaneously with type properties. It can be very time-consuming and make you work less efficiently.

But with the help of a Dynamo script, it is possible to turn Level Bubbles on or off simultaneously. Also, the script allows you to choose from which sides the Level Bubbles have to be shown or hidden, which makes you more flexible.

I hope this article helped you to understand how to turn off multiple level bubbles, and how to do this with the help of a Dynamo script. If you have any questions, just drop a comment below.

Get more stuff like this

Revit, Dynamo, Sketchup and BIM Tips

I hate spam too, so you can unsubscribe at any time.

7 thoughts on “How to Turn Off Multiple Level Bubbles in Revit”

  1. This is a great idea along with your grid bubbles one. I have long wished to be able to do this, especially for levels.
    I attempted to recreate the script but ran into a couple of problems.
    1. The first Code Block was input exactly per your code. It did not create the three inputs (a, sview, mview) and warned of error: “.” expected. I tried some things. When I replaced the ? with a semicolon, the three inputs were created and the error was eliminated. However, this resulted in three outputs being created which appears to defeat the filter.
    2. When I created the ‘Toggle Level Bubbles’ Code Block by copying and pasting, I got the error: “EOF” expected. I tried a hard Return, but without effect.
    Please help me get this running. When I do I intend to add a front end to Bubbles select Off, Left, Right, On.

    • We can fix the first problem you write about by using a colon instead of a semicolon after “Sview”. This part should work fine now.

      a != “DrawingSheet” ?

      We can fix the second problem by using a “Python Scrip” node instead of a “Code Block”. When you place the node, open it by right-clicking on it and selecting Edit. In the editor, remove all standard code and then copy and paste the code here. After saving the editor, you can close the window and then add two extra inputs (IN[1], IN[2]) by clicking on the ‘+’ on the node. Now add the boolean for left and right from part 1, and your script should work fine.

      I hope this fixed your issues.

Leave a Comment