File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Toggle the visibility of the Level Bubble in Section/Elevation
3+ The snippet can be reused for Grids
4+ TESTED REVIT API: 2018
5+ The snippet can be used as is in a Revit Application Macro for test purposes
6+ Author: Deyan Nenov | github.com/ArchilizerLtd
7+ This file is shared on www.revitapidocs.com
8+ For more information visit http://github.com/gtalarico/revitapidocs
9+ License: http://github.com/gtalarico/revitapidocs/blob/master/LICENSE.md
10+ */
11+
12+ public void ToggleLevelBubbles()
13+ {
14+ Document doc = this.ActiveUIDocument.Document;
15+ Selection sel = this.ActiveUIDocument.Selection;
16+
17+ do
18+ {
19+ //Pick the Level you want to toggle in Elevation/Section
20+ Level lvl = doc.GetElement(sel.PickObject(ObjectType.Element, "Pick View to Align To")) as Level;
21+
22+ using(Transaction t = new Transaction(doc, "toggle"))
23+ {
24+ t.Start();
25+ lvl.HideBubbleInView(DatumEnds.End0,doc.ActiveView); //DatumEnds.End1 to toggle the other End
26+ t.Commit();
27+ }
28+ }
29+ while(true);
30+ }
You can’t perform that action at this time.
0 commit comments