Jump to content

How can I call a ironpython script from another script, if someone can provide an example that would be best

Manoj Chaurasia

Recommended Posts

  • 1 year later...

Hi. This is how call an another script without parameters:


from Spotfire.Dxp.Application.Scripting import ScriptDefinition

from System.Collections.Generic import Dictionary

import clr


scriptDef = clr.Reference[scriptDefinition]()

Document.ScriptManager.TryGetScript("otherScript", scriptDef)

params = Dictionary[str, object]()

Document.ScriptManager.ExecuteScript(scriptDef.ScriptCode, params)

Link to comment
Share on other sites

  • 11 months later...
  • 2 years later...

Hi P.shu,


My Script "A" has an API call using OAUTH to load the Data. that API call is not being made when i load the Spotfire dxp file(created datafunction to trigger script when the doc property changes)   or call this script A from another script (using above code). 


Did this help you in understanding what i was trying to do



Link to comment
Share on other sites

If i run the script inside Edit Window, the API call is being made and Latest Data Loads. but I dont want to manually execute the Script all the time. I want the Script to get executed automatically, or through some button. I tried multiple ways, it looks like the latest data is not loaded until and unless i manually execute the script. 
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...