Skip to content

Commit

Permalink
add support #4
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Mar 5, 2024
1 parent 1435a3b commit 52d5f68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def get_all_categories(self) -> dict:
self._get_recursive_child(categories, 1, "_RC")
return categories

def get_all_data(self, is_get_sub_family=False) -> pd.DataFrame:
childs = self.get_children(1)
dataframe = self._get_recursive_ids(childs,is_get_sub_family)
return dataframe
def get_all_families(self) -> dict:
families = {}
self._get_recursive_child(families, 1, "_RFN")
Expand Down
4 changes: 4 additions & 0 deletions APSToolkitPython/src/test/test_prop_reader_revit.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def test_get_all_families_types(self):
families_types = self.prop_reader.get_all_families_types()
self.assertNotEquals(families_types, 0)

def test_get_all_data(self):
data = self.prop_reader.get_all_data()
self.assertIsNotNone(data)

def test_get_data_by_category(self):
df = self.prop_reader.get_data_by_category("Windows",True)
# check if dataframe have rows = 1
Expand Down

0 comments on commit 52d5f68

Please sign in to comment.