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

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.tibco.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<MapChart>
	{
		// Constructors

		protected override bool GetSupportsPromptingCore()
		{
			return true;
		}

		protected override IEnumerable<object> ExecuteAndPromptCore(MapChart context)
		{
			this.ExecuteCore(context);
			yield break;
		}

		protected override bool IsEnabledCore(MapChart context)
		{
			return true;
		}

		protected override void ExecuteCore(MapChart context)
		{
			// code here
		}
	}
}

 

(1) Answer

Login