Hide GridBubble in View

Hello Larsa.
I dont know what went wrong in your Dynamo script. At our office we use this every day. We integrated our scripts with Dyno in Revit. Dyno - Releases and News
Anyway, i uploaded the script again. Maybe this time it will work.

<a class=“attachment"href=”//discourse-cloud-file-uploads.s3.dualstack.us-west-2.amazonaws.com/business6/uploads/dynamobim/original/3X/6/9/694b41ef6150b788e20cbe1acfb3e0faddf26d43.dyn">Toggle Grid Bubbles.dyn (11.4 KB)

1 Like

Hmm, I still can’t get it to work, I’m really new to this Dynamo stuff. And the Dyno installation didnt work as expected either.
I get the browser, but no content in it and the sample map that they talk about in the manual does not show up.
At this rate it will be faster to just do it manually.
Thanks for the help anyway! Appreciate the effort! :slight_smile:

Im having a similar problem,
After running the script, if you click on the grid you can see that the check box is un checked but the grid head is still visible as you can see in the image below.
the scrip is working but why is the grid head still visible ??

Thanks for sharing!

As usual, it works perfectly! :wink:

I would like to share this script which toggles all the grid bubbles.
This works for a single View or for all the Views on a Sheet. Depends on which is marked as ActiveView

Toggle Grid Bubbles_.dyn (10.7 KB)

#Start Python Script

import clr
from Autodesk.DesignScript.Geometry import *
# Import ToDSType(bool) extension method
import Revit
# Import geometry conversion extension methods
# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
views = UnwrapElement(IN[0])
firstview = views[0]
elements = list()


coll = FilteredElementCollector(doc, firstview.Id)
filt = ElementCategoryFilter(BuiltInCategory.OST_Grids)
grids = coll.WherePasses(filt).ToElements()
firstgrid = grids[0]

# controleer eerste stramien aan/uit
x = firstgrid.IsBubbleVisibleInView(DatumEnds.End0, firstview)

# verzamel alle grids per view
for view in views:
	collector = FilteredElementCollector(doc, view.Id)
	filter = ElementCategoryFilter(BuiltInCategory.OST_Grids)
	grids = collector.WherePasses(filter).ToElements()
	# zet bubbles aan uit per stramien
	for grid in grids:
		if x == True:
			grid.HideBubbleInView(DatumEnds.End0, view)
			grid.HideBubbleInView(DatumEnds.End1, view)
			out = "Bubbles Hidden"
			grid.ShowBubbleInView(DatumEnds.End0, view)
			grid.ShowBubbleInView(DatumEnds.End1, view)
			out = "Bubbles Shown"



OUT = (firstgrid, x, elements, out)

can i edit the same to show/ hide level head bubbles per view

Yes. See mine topic you just saw. You can use that graph.

I know it is a pretty old post but do u anychase have any idea if we could extend or shorten the Grid lingth when they are 2D grid. SO a similar principle like all the views in sheets where instead of hiding the Grid I want to extend out or push in all the grid bubbles by a certain distance.
Would that even be possible?

Thanks for sharing. Working fine. My only comment is that i want to be able to draw the spline in between the viewport and the annotation crop.