Georgi Koemdzhiev Posted September 18, 2019 Share Posted September 18, 2019 Hello, I am looking a ways to extend Spotfire by building custom C# extensions. However, I am finding the guides on the TIBCO website (https://community.spotfire.com/wiki/how-export-data-tibco-spotfire-using-ironpython-script-and-c) to be not complete. For example, I am not sure how to get a reference to the "app" (i.e. Application) itself here: I am aware that you get a reference to the app depends on the kind of custom extension you are building. For example, if I am building a CustomTool extension, how am I supposed to get a reference to the app itself -> public class VisualisationRightClickDownload : CustomTool { // Constructors protected override bool GetSupportsPromptingCore() { return true; } protected override IEnumerable ExecuteAndPromptCore(MapChart context) { this.ExecuteCore(context); yield break; } protected override bool IsEnabledCore(MapChart context) { return true; } protected override void ExecuteCore(MapChart context) { // code here } } } Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted September 18, 2019 Share Posted September 18, 2019 You can use below code to access analysis applcation in the ExecuteCore() var application = context.Context.GetService(); Link to comment Share on other sites More sharing options...
Georgi Koemdzhiev Posted September 19, 2019 Author Share Posted September 19, 2019 Perfect! Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now