使用Python脚本在Spotfire中只重置一个特定的过滤方案

2024-04-26 04:13:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我想要一个Python脚本,它允许我在Spotfire中只重置一个特定的过滤方案。此筛选方案不必是页面上的活动筛选方案。在

在我的Spotfire文件中,一个示例过滤方案的名称是“Customer\u settings”

我只设法从网站上获得了一个脚本,正在重置所有的方案(见下文),另外,我想有一个脚本,我可以指定一个单一的过滤方案,以重置。在

重置所有方案的脚本:

from Spotfire.Dxp.Data import *

from Spotfire.Dxp.Application.Filters import *

def resetAllFilteringSchemes():

     # Loop through all filtering schemes

     for filteringScheme in Document.FilteringSchemes:

          # Loop through all data tables

          for dataTable in Document.Data.Tables:

               # Reset all filters

               filteringScheme[dataTable].ResetAllFilters()                        

# Call the function

resetAllFilteringSchemes()

Tags: infromimport脚本loopfordata方案