在 Spotfire 中执行脚本时尝试运行进度条时出现系统错误

问题描述 投票:0回答:1

当尝试使用此基本代码片段来测试进度条时,我收到错误消息“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)
ironpython spotfire
1个回答
0
投票

您需要取消勾选“在事务中执行”

© www.soinside.com 2019 - 2024. All rights reserved.