Spotfire Extension

HI Guys,

When i am trying to execute  tool using iron python it is giving me error. Below is the code. When i am running script it is giving me error on last line i.e. on line "tool.Execute(Document.ActivePageReference)"

import clr
clr.AddReference("SpotfireDeveloper.ExportToolExample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4d95002c27fab778")
import Spotfire.Dxp.Application
from SpotfireDeveloper.ExportToolExample import ExportToHtmlTool

found, tool = Application.Toolbox.TryGetTool[ExportToHtmlTool]()

if found:
    tool.Execute(Document.ActivePageReference)

Error :

Traceback (most recent call last):
  File "Spotfire.Dxp.Application.ScriptSupport", line unknown, in ExecuteForDebugging
  File "<string>", line 9, in <module>
TypeError: Execute() takes exactly 1 argument (0 given)

Microsoft.Scripting.ArgumentTypeException: Execute() takes exactly 1 argument (0 given)
   at _stub_$484##484(Closure , CallSite , CodeContext , Object )
   at Microsoft.Scripting.Actions.MatchCaller.Call2[T0,T1,TRet](Func`4 target, CallSite site, Object[] args)
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at <module>$474##474(Closure , Scope , LanguageContext )
   at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink)
   at Spotfire.Dxp.Application.ScriptSupport.IronPythonScriptEngine.ExecuteForDebugging(String scriptCode, Dictionary`2 scope, Stream outputStream)

 

(1) Answer

Login