Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to "Toggle All Grids Bubbles" to toggle bubbles at the sides of the view (top|bottom, left|right) #2248

Open
eirannejad opened this issue May 8, 2024 · 2 comments
Labels
New Feature New feature request [class->Implemented #{number}: {title}]

Comments

@eirannejad
Copy link
Collaborator

From pyRevit fan:

"toggle all grids bubbles in current view" is it possible to choose either the top bubbles on the sheet or bottom bubbles on the sheet to turn a whole set of those on or off? Or is the only option is to turn all of the grids on or off regardless of if they're on top or bottom, left or right?

@eirannejad eirannejad added the New Feature New feature request [class->Implemented #{number}: {title}] label May 8, 2024
@jmcouffin
Copy link
Contributor

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.

@tay0thman
Copy link

tay0thman commented May 13, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature request [class->Implemented #{number}: {title}]
Projects
None yet
Development

No branches or pull requests

3 participants