From 52d5f68ce78a6574a5f185555ae7fb397eec8863 Mon Sep 17 00:00:00 2001 From: Chuong Ho <31106432+chuongmep@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:23:14 +0800 Subject: [PATCH] add support #4 --- APSToolkitPython/src/aps_toolkit/ProDbReaderRevit.py | 4 ++++ APSToolkitPython/src/test/test_prop_reader_revit.py | 4 ++++ 2 files changed, 8 insertions(+) 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