当尝试使用此基本代码片段来测试进度条时,我收到错误消息“SystemError:尝试在文档事务的上下文中执行 ProgressOperation。”。
from Spotfire.Dxp.Framework.ApplicationModel import *
import traceback , time
proc=Application.GetService[ProgressService]()
def ex():
try:
# Wait for 5 seconds, Just to keep progress screen up for demo -
remove from actual code
time.sleep(5)
proc.CurrentProgress.ExecuteSubtask("Refreshing Data")
Document.Data.Tables.ReloadAllData()
proc.CurrentProgress.ExecuteSubtask("Refresh is Complete")
except:
traceback.print_exc()
proc.ExecuteWithProgress("Refreshing Data Manually","Trying to refresh
all Data Tables with a progress bar", ex)
您需要取消勾选“在事务中执行”