Referencing and manipulating the primary elements in an analysis file
No matter what you want to do with a Python script, you have to start with basic references. The analysis file is referred to as a Document
in the API, and the Spotfire.Dxp.Application Document
class and some classes in the Spotfire.Dxp.Data
namespace provide the means for referencing what could be called the primary elements: pages, visualizations, properties, panels (such as filter schemes), markings, and data tables. Generally, you can directly reference an active element or iterate through the Document to find an element of interest, based on its name, for example. In some cases, you can reference an element directly based on some unique attribute, such as its name.
The important thing to understand is that you need to have a reference or a handle on an object such as a visualization before you can manipulate the more detailed properties of this object. For clarity, we will follow an important convention in the properties...