How to find the Visualization IDs for different visualizations in a Spotfire analysis (DXP) file.

How to find the Visualization IDs for different visualizations in a Spotfire analysis (DXP) file.

book

Article ID: KB0082641

calendar_today

Updated On:

Products Versions
Spotfire Analyst All Versions

Description

Description:
This article describes how to find the visualization IDs for different visualizations in a Spotfire analysis file.

Issue/Introduction

How to find the Visualization IDs for different visualizations in a Spotfire analysis (DXP) file.

Resolution

Currently there is no way to find the "VisualizationId" of different visualizations in the analysis file directly in the Spotfire Analyst / client. It requires using an IronPython script. The following example script will output the Visualization IDs for the different visualizations in the analysis file.
 
============
from Spotfire.Dxp.Application.Visuals import *

for visual in Document.ActivePageReference.Visuals:
    print visual.Title + " >>> " +  str(visual.Id)
============
 
 
Disclaimer:
The script code in this article is only a sample to be used as a reference. It is not intended to be used "As Is" in a Production environment. Always test in a Development environment. Make modifications to the script in accordance with your implementation specifications that best suit your business requirements. Refer to the API reference(s) cited in this article for usage of the classes and methods used in the script.

Additional Information

Refer to the following sample link to learn more about the unique ID of visualizations.

https://docs.tibco.com/pub/doc_remote/spotfire/7.0.1/doc/api/?topic=html/P_Spotfire_Dxp_Application_Visual_Id.htm