diff --git a/APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py b/APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py index 84f08e1..5b4daf8 100644 --- a/APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py +++ b/APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py @@ -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") diff --git a/APSToolkitPython/src/test/test_prop_reader_revit.py b/APSToolkitPython/src/test/test_prop_reader_revit.py index 7812b4c..f555da3 100644 --- a/APSToolkitPython/src/test/test_prop_reader_revit.py +++ b/APSToolkitPython/src/test/test_prop_reader_revit.py @@ -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