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

Sync Views bugfix, Copy State improvements #893

Conversation

melnikovalex
Copy link
Contributor

Hey Ehsan

Thank you for your last updates and for fixing my code. I haven't had a chance to use all of it in a new release, but run into one bug.

It looks like we messed up Sync View (also in Copy State) a bit. It stopped working at all in the new release.

I did the fixes (da06d5c, d4cf8e5) and added a couple of improvements:

Added a new method into pyrevit.script which returns true if datafile exists. Can be moved out of there if it's too narrow case.

  • edfff54 Copy State - allow to copy between projects

I can name several use cases when it's necessary: to navigate in two linked model (e.g. structural and architectural, it should also work in two Revit sessions), to compare visual differences with an older version of a model.

It won't work with Filters and V/G Settings, unfortunately, so there are a couple of extra lines to say which method only for this_project.

I was wondering if it is possible to do the same for 'Sync Views'. Doing it directly could be annoying if you switching between not connected projects. I was thinking about enabling it with Shift Click but couldn't find a good solution for that.

  • 427de7c Copy Filter Overrides - support active view, fixes

When I code this part before, the idea was to be able to copy from active_view and paste to active view. So I recovered this code. If no views selected, it gets or sets data for the active one.

If you're seeing all these commits from 2019 in PR, sorry for that. One day I'll learn how to do it properly 😄

Thanks in advance!

Alex

melnikovalex and others added 30 commits May 30, 2019 11:46
# Conflicts:
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print.pulldown/Print Ordered Sheet Index.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Decrement Selected Sheet Numbers.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Increment Selected Sheet Numbers.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/ReOrder Sheets.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack3/Legends.pulldown/Copy Legends to Other Documents.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack3/Groups.pulldown/Explode And Remove Selected Groups.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit2.stack3/Override.pulldown/Override VG.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/Pick.splitpushbutton/Pick.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/select.stack3/Select.pulldown/Invert Selection.pushbutton/script.py
#	pyrevitlib/pyrevit/forms/__init__.py
#	pyrevitlib/pyrevit/loader/basetypes/baseclasses.cs
#	pyrevitlib/pyrevit/revit/db/query.py
# Conflicts:
#	extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/ListElementsOfSelectedLevel.pushbutton/ListElementsOfSelectedLevel_script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Selected Viewports To Selected Sheets.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Move Selected Viewports To Selected Sheet.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack/Legends.pulldown/Convert Drafting to Legend.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack/Legends.pulldown/Convert Legend to Drafting.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack/Views.pulldown/Add Views to Sheets.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack/Views.pulldown/Duplicate Selected Views.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/views.stack/Views.pulldown/Remove Empty Tags.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit1.stack3/Overkill.pushbutton/script.py
#	extensions/pyRevitTools.extension/pyRevit.tab/Selection.panel/select.stack3/Select.pulldown/Select All Vertical Reveals.pushbutton/script.py
#	pyrevitlib/pyrevit/forms/__init__.py
@eirannejad
Copy link
Collaborator

eirannejad commented May 11, 2020

Hey @melnikovalex Thank you so much for improving the codebase and submitting your changes, but, massive PRs like this make it very very hard for me to review the changes. I basically have to go through every commit, determine what are the changes, make adjustments and test, and move on to the next. A single PR, needs to focus on a single change to it can be easily reviewed and tested. It's okay to include multiple commits in a PR, but not too many like this one.

This means that reviewing a PR like this, most likely, is not a single-day job and gonna take a lot of time. Also, it makes it very hard for other contributors to help in reviewing the PR since it is all in one chunk. If this is broken down into 5-6 individual PRs, they can be reviewed independently by multiple developers.

Would you mind breaking this into PRs organized based on the type of improvement or new feature/tool they add?

@melnikovalex
Copy link
Contributor Author

Would you mind breaking this into PRs organized based on the type of improvement or new feature/tool they add?

Sorry, missed your message. Here is it: #927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants