Jump to content

How to get a reference to the "app" in a C# custom extension


Georgi Koemdzhiev

Recommended Posts

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

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...