Open eirannejad opened 5 months ago
No directionality implemented in the code https://github.com/pyrevitlabs/pyRevit/blob/master/extensions/pyRevitTools.extension/pyRevit.tab/Drawing%20Set.panel/views.stack/Views.pulldown/Toggle%20All%20Grid%20Bubbles%20in%20Current%20View.pushbutton/script.py
All on or off. Closest and easiest thing would be to add option for end0 or end1, but that would all depend on what was the first and second drawing point.
not fully automated , but flipping grids much easier using multi-selections.
doc = revit.doc
active_view = doc.ActiveView
grids = revit.get_selection()
if not grids:
forms.alert('No Grids selected!', exitscript=True)
end_0 = []
end_1 = []
with revit.Transaction('Flip Grids'):
for grid in grids:
# Define Ends
end_0 = grid.IsBubbleVisibleInView(DB.DatumEnds.End0, active_view)
end_1 = grid.IsBubbleVisibleInView(DB.DatumEnds.End1, active_view)
if end_0:
grid.HideBubbleInView(DB.DatumEnds.End0, active_view)
else:
grid.ShowBubbleInView(DB.DatumEnds.End0, active_view)
if end_1:
grid.HideBubbleInView(DB.DatumEnds.End1, active_view)
else:
grid.ShowBubbleInView(DB.DatumEnds.End1, active_view)
Hi guys,
I found a good workaround with the curve endpoints, they match the DatumEnds (0|1) Have to deal with the view orientation now...
From pyRevit fan: