2
我想打印特定於儀表板每個頁面的過濾方案的「名稱」。需要IronPython代碼才能在Spotfire中輸出過濾方案
例如,儀表板的第1頁可能有一個名爲「過濾方案1」的過濾方案,第2頁有「過濾方案2」。我有代碼輸出所有的過濾方案,但我無法弄清楚如何將特定的方案關聯到它所在的頁面。
for pg in Document.Pages:
print pg.Title # the page name
myPanel = pg.FilterPanel
print myPanel.Title # output is the word: Filters
# THIS IS WHERE I WOULD WANT THE FILTERING SCHEME NAME TO APPEAR
print myPanel.Visible # output: True
print myPanel.Context # output: Spotfire.Dxp.Application.Filters.FilterPanel
print myPanel.TypeId # TypeIdentifier:Spotfire.FilterPanel
print myPanel.FilteringSchemeReference
for i in range(myPanel.TableGroups.Count):
for gcObj in myPanel.TableGroups[i].FilterCollectionReference:
myFilter= myPanel.TableGroups[i].GetFilter(gcObj.Name)
if myFilter.Visible:
szCanSee = ' <Visible>'
else:
szCanSee = ' <Hidden>'
print myFilter.FilterReference.ToString() + szCanSee
+1寫得很好的第一個問題。 – RyanfaeScotland
如果我的回答沒有回答你的問題,你可以回覆更多的細節,否則請考慮標記爲已接受。 – RyanfaeScotland