Skip to content

Commit

Permalink
🐛 Filtered Legend ViewTemplates
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikFrits committed Jul 3, 2023
1 parent b94b5e8 commit 30a5350
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
# GET ALL LEGEND VIEWS
all_views = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Views).ToElements()
all_legends = [view for view in all_views if view.ViewType == ViewType.Legend]
all_legends = [view for view in all_legends if not view.IsTemplate]

if not all_legends:
forms.alert("There has to be at least 1 Legend View in the project! "
"Please create one and try again.", exitscript=True)
Expand Down

1 comment on commit 30a5350

@KhaledRabie2023
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THanks

Please sign in to comment.