Skip to content

Commit

Permalink
Revert "Update filter.py"
Browse files Browse the repository at this point in the history
This reverts commit 1206e7f.
  • Loading branch information
marcantondahmen committed Feb 9, 2021
1 parent b3f7d04 commit 9270cd4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions revitron/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Filter:
A filter class based on the ``FilteredElementCollector`` class.
"""

def __init__(self, scope = None, doc = None):
def __init__(self, scope = None):
"""
Inits a new Filter instance.
Expand All @@ -31,19 +31,16 @@ def __init__(self, scope = None, doc = None):
"""
import revitron

if not doc:
doc = revitron.DOC

self.scope = scope
if scope:
if type(scope) == list:
elementIds = []
for element in scope:
elementIds.append(element.Id)
scope = List[revitron.DB.ElementId](elementIds)
self.collector = revitron.DB.FilteredElementCollector(doc, scope)
self.collector = revitron.DB.FilteredElementCollector(revitron.DOC, scope)
else:
self.collector = revitron.DB.FilteredElementCollector(doc)
self.collector = revitron.DB.FilteredElementCollector(revitron.DOC)


def all(self):
Expand Down

0 comments on commit 9270cd4

Please sign in to comment.