みんな、おはよう、
私はこの問題に数日間取り組んできましたが、解決策がわかりません。私は調査して無駄にグーグルで検索しました。どんな助け/洞察も大歓迎です。クリックすると自動的に日付フィルター (1/1/15 から開始) を通過し、1/2 -1/5 を通過して新しくフィルターされたマーカー レイヤーでマップを更新するボタンを作成しようとしています。関数。フィルターが 1/1 から 1/5 をステップスルーするようになりました。ただし、進行中にマップの視覚化が更新されないため、ユーザーに表示されるのは、1/1 から 1/5 へのジャンプとその間の一時停止だけです (ステップごとにスリープ タイマーを使用しています)。以下のコードを含めました。IronPython を学習したばかりで、ビジュアライゼーションを更新するために何を呼び出す必要があるかわかりません。Visualization.Refresh() が機能しません。本当にありがとう!
import Spotfire.Dxp.Application.Filters as filters
import Spotfire.Dxp.Application.Filters.ItemFilter
import time
from Spotfire.Dxp.Application.Filters import FilterTypeIdentifiers
from Spotfire.Dxp.Data import DataProperty, DataType, DataPropertyAttributes, DataPropertyClass
from Spotfire.Dxp.Application.Visuals import MarkerLayer
myPanel = Document.ActivePageReference.FilterPanel
myFilter= myPanel.TableGroups[2].GetFilter("Date (Daily)")
myFilter.FilterReference.TypeId = FilterTypeIdentifiers.ItemFilter
itemFilter = myFilter.FilterReference.As[filters.ItemFilter]()
whichCol = itemFilter.DataColumnReference
count = 0
while count < 5:
count = count +1
if (whichCol.Properties.PropertyExists("CurrentStep") == False):
myProp = DataProperty.CreateCustomPrototype("CurrentStep",0,DataType.Integer,DataPropertyAttributes.IsVisible|DataPropertyAttributes.IsEditable)
Document.Data.Properties.AddProperty(DataPropertyClass.Column, myProp)
whichCol.Properties.SetProperty("CurrentStep",0)
Document.Properties["DateTest"] = "1/1/15"
time.sleep(1)
else:
time.sleep(1)
whichVal = whichCol.Properties.GetProperty("CurrentStep")
#print whichVal
#print itemFilter.Values.Count
if (whichVal == itemFilter.Values.Count):
whichCol.Properties.SetProperty("CurrentStep",0)
Document.Properties["DateTest"] = "1/1/15"
else:
itemFilter.Value = itemFilter.Values.Item[whichVal]
whichCol.Properties.SetProperty("CurrentStep",whichVal+1)
Document.Properties["DateTest"] = itemFilter.Value