Georgi Koemdzhiev Posted October 8, 2019 Share Posted October 8, 2019 Hello, I am wondering if it's possible to convert the Map chart to CrossTable (I need to execute the ExportText method that is part of the CrossTable class) in memory I don't want to "visually" change the Analysis's page, the only reason I want to convert the above visualizations is to be able to execute the ExportText method. The code below does work but it switches the visualizations. Any ideas from System.IO import Path, File, StreamWriter from Spotfire.Dxp.Application.Visuals import * for vis in Document.ActivePageReference.Visuals: if vis.TypeId == VisualTypeIdentifiers.MapChart2: vis.TypeId = VisualTypeIdentifiers.CrossTable ct = vis.As[CrossTablePlot]() writer = StreamWriter("C:\Users\user\Desktop\GDAta.txt") ct.ExportText(writer) print("Export done") vis.TypeId = VisualTypeIdentifiers.MapChart2 vis.As[MapChart]() 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