# Hide GridBubble in View

**URL:** <https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977>\
**Category:** Packages\
**Tags:** revit, clockwork\
**Created:** [July 11, 2016, 12:25pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977 "2016-07-11T12:25:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [July 11, 2016, 12:25pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/1 "2016-07-11T12:25:13Z")

</div>

I want to control the grid bubbles via Dynamo in Revit.  
When I watch the Object Members of the Grids i can see the function,  
but I can’t figure out how to run this method.  
Can someone help me out.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/52ca76a50943570121af5833f713693daddf97a9.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [July 11, 2016, 1:06pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/2 "2016-07-11T13:06:49Z")

</div>

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c8a1cb1be20ffb55c795da8b5a58e2174c561c1e.gif)

---

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [July 11, 2016, 1:31pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/3 "2016-07-11T13:31:03Z")

</div>

Thanx Kulkul,  
actually, with this script you change the Yes/No Type Parameter from the Grid Type.  
I am looking for a way to change the visibility of the grid bubble per view.  
Once the grid bubble is hidden, it can’t control it by type parameters

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/1/1ba52a963b728e0aa49245f332ecddedb359c9c2.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [July 11, 2016, 2:50pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/4 "2016-07-11T14:50:38Z")

</div>

In that case check revit api class Autodesk.Revit.DB.DatumPlane.

DatumPlane.HideBubble() – Hides bubble in the specified view

> **[What's New in the Revit 2016 API](http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html#4.03)**
>
> Here is the online version of the 'What's New' section of the Revit 2016 API help file. The information provided here is extracted from the document 'Revit Platform API Changes and Additions.docx' provided with the Revit SDK. As said, is also...

---

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [July 12, 2016, 5:35am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/5 "2016-07-12T05:35:45Z")

</div>

I found that too.  
See also the Object Members in the first screenshot.  
But i want to know how to set up a script with that api class.

---

<div class="post-metadata">

**Author:** ![Tomasz\_Puchala](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tomasz\_Puchala](https://forum.dynamobim.com/u/Tomasz_Puchala)\
**Post date:** [July 12, 2016, 7:30am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/6 "2016-07-12T07:30:14Z")

</div>

Do you need code for rvt 2016?

---

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [July 12, 2016, 8:27am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/7 "2016-07-12T08:27:06Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![Tomasz\_Puchala](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tomasz\_Puchala](https://forum.dynamobim.com/u/Tomasz_Puchala)\
**Post date:** [July 12, 2016, 8:43am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/8 "2016-07-12T08:43:42Z")

</div>

This code controls “ticking” stuff:  
[http://paste.ofcode.org/TzUV8PDdtyRtC3zCSKSeqJ](http://paste.ofcode.org/TzUV8PDdtyRtC3zCSKSeqJ)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/e/ec7dccafe51777a20b0513b9466437b304435042.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [July 12, 2016, 12:12pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/9 "2016-07-12T12:12:00Z")

</div>

@Tomasz_Puchala 👍thanks for taking over this issue was busy bit.

@thurevit3 Kindly mark the post as solved. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Ben\_Osborne](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_osborne/32/17366_2.png) [@Ben\_Osborne](https://forum.dynamobim.com/u/Ben_Osborne)\
**Post date:** [July 14, 2016, 12:23pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/10 "2016-07-14T12:23:11Z")

</div>

Attached is a script that will turn on/off grid heads based on the intersection of a detail line/spline drawn through the grids. The purpose of this is to determine whether the user intends to turn off End0 or End 1 of the Grid (because the end nearest the bottom of the page might not be consistently 0 or 1…).

[Grid Head Changer.dyn](https://forum.dynamobim.com/uploads/short-url/dvSpxJftRMtls2NsmI5dfJxhX3h.dyn) (18.3 KB)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/7/7a85398b3403d628f9ec53e2972020ccd1d6535f.PNG)

---

<div class="post-metadata">

**Author:** ![Lknapton](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lknapton](https://forum.dynamobim.com/u/Lknapton)\
**Post date:** [October 18, 2016, 11:52am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/11 "2016-10-18T11:52:31Z")

</div>

Hi, I can’t seem to get this script to work (link does not work anymore). Also, how can i modify script to turn GridBubbles ON. Thanks

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices

from RevitServices.Persistence import *
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

a = UnwrapElement(IN[0])
v = UnwrapElement(IN[1])
TransactionManager.Instance.EnsureInTransaction(doc)
for i in a:
	i.HideBubbleInView(DatumEnds.End1,v)
	i.ShowBubbleInView(DatumEnds.End0,v)
	#i.HideBubble(b)
	
TransactionManager.Instance.TransactionTaskDone()

doc.Regenerate()

OUT = 0
```

---

<div class="post-metadata">

**Author:** ![Lknapton](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lknapton](https://forum.dynamobim.com/u/Lknapton)\
**Post date:** [October 18, 2016, 11:56am UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/12 "2016-10-18T11:56:10Z")

</div>

Ah… I’m using Revit 2015. I assume api is different?

---

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [October 18, 2016, 12:15pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/13 "2016-10-18T12:15:58Z")

</div>

This script is created with Dynamo 1.2 and the Revit 2017 api.  
The node **TB\_Show-Hide** is actually the Python script.  
The .dyn file is attached

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/05d9206848d0ae6315a0db3fe0a8a7ec8936507c.PNG)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/e/e8dcfabc266f11215ff4a4f4699edfbe373fa66f.PNG)

[Toggle Grid Bubbles.dyn](https://forum.dynamobim.com/uploads/short-url/odrFxpyBM3V4Fm2jzTHP9L5F7g7.dyn) (11.6 KB)

---

<div class="post-metadata">

**Author:** ![Lknapton](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lknapton](https://forum.dynamobim.com/u/Lknapton)\
**Post date:** [October 18, 2016, 12:47pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/14 "2016-10-18T12:47:17Z")

</div>

Thanks for quick reply. I can only use Dynamo 1.0 and the project is in 2015.How can I change the script to work for 2015? Any advice would be great. Thanks

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [October 18, 2016, 1:56pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/15 "2016-10-18T13:56:45Z")

</div>

> [@Lknapton](#):
>
> How can I change the script to work for 2015?

I don’t think you can, because this was a new feature of Revit API 2016. Sorry about that.

---

<div class="post-metadata">

**Author:** ![Ben\_Osborne](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_osborne/32/17366_2.png) [@Ben\_Osborne](https://forum.dynamobim.com/u/Ben_Osborne)\
**Post date:** [October 18, 2016, 2:01pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/16 "2016-10-18T14:01:34Z")

</div>

Those methods only work in 2016 and newer. The only way to do it pre-2016 was manually via the UI.

---

<div class="post-metadata">

**Author:** ![thurevit3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thurevit3/32/51807_2.png) [@thurevit3](https://forum.dynamobim.com/u/thurevit3)\
**Post date:** [October 18, 2016, 2:08pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/17 "2016-10-18T14:08:48Z")

</div>

> **[What's New in the Revit 2016 API](http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html)**
>
> Here is the online version of the 'What's New' section of the Revit 2016 API help file. The information provided here is extracted from the document 'Revit Platform API Changes and Additions.docx' provided with the Revit SDK. As said, is also...

---

<div class="post-metadata">

**Author:** ![Lknapton](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lknapton](https://forum.dynamobim.com/u/Lknapton)\
**Post date:** [October 18, 2016, 4:23pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/18 "2016-10-18T16:23:28Z")

</div>

Thanks for the info guys

---

<div class="post-metadata">

**Author:** ![Klodi\_Uruci](https://avatars.discourse-cdn.com/v4/letter/k/22d042/32.png) [@Klodi\_Uruci](https://forum.dynamobim.com/u/Klodi_Uruci)\
**Post date:** [June 24, 2017, 2:34pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/19 "2017-06-24T14:34:50Z")

</div>

Hi,

Thank you for sharing. It works fine for me.

---

<div class="post-metadata">

**Author:** ![Larsa](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@Larsa](https://forum.dynamobim.com/u/Larsa)\
**Post date:** [July 11, 2017, 1:31pm UTC](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977/20 "2017-07-11T13:31:00Z")

</div>

Sorry for replying in an old thread, but I recently ran into this problem and tried this Node.  
I downloaded the packeges and got rid of all warnings, and the node looks exactly like in your screenshot. But nothing happends to my grid-bubbles when I run the node. Am I missing something?

[Next page](https://forum.dynamobim.com/t/hide-gridbubble-in-view/4977.md?page=2)
