Working with Filter Data from MPP files in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Reading Filter Definition Data
To read Filter Definition Data using Aspose.Tasks Java for Ruby, call get_filter_definition_data method of FilterData module. Here you can see example code.
Ruby Code
1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2task_filters = project.getTaskFilters().toList()
3puts "Task Filters Count: " + task_filters.size().to_s
4puts "All Tasks: " + task_filters.get(0).getName().to_s
5puts "Task Item: " + task_filters.get(0).getFilterType().to_s
6puts "Task Filters Show In Menu: " + task_filters.get(0).getShowInMenu().to_s
7puts "Task filter ShowRelatedSummaryRows: " + task_filters.get(0).getShowRelatedSummaryRows().to_s
8rsc_filters = project.getResourceFilters().toList()
9puts "Project.ResourceFilters count: " + rsc_filters.size().to_s
10puts "Resource Filter Item Type: Item.ResourceType: " + rsc_filters.get(0).getFilterType().to_s
11puts "Resource filter ShowInMenu" + rsc_filters.get(0).getShowInMenu().to_s
12puts "Resource filter ShowRelatedSummaryRows: " + rsc_filters.get(0).getShowRelatedSummaryRows().to_s
Download Running Code
Download Working with Filter Data from MPP files (Aspose.Tasks) from any of the below mentioned social coding sites: