Ghantasala Krishna Kowsik Posted May 18, 2018 Share Posted May 18, 2018 Hi While using reset all markings as a button it is clearing all markings in all pages I want to restrict reset all markings to active page only Any one help me regarding this Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted May 18, 2018 Share Posted May 18, 2018 Hello Krishna, You can try the below script to reset the marking for visualizations in current active page from Spotfire.Dxp.Data import * from Spotfire.Dxp.Application.Filters import * from Spotfire.Dxp.Application.Visuals import * marking=None page=Document.ActivePageReference for visual in page.Visuals: if visual.TypeId != VisualTypeIdentifiers.HtmlTextArea: vis=visual.As[VisualContent]() dataTable=vis.Data.DataTableReference marking=vis.Data.MarkingReference rows = RowSelection(IndexSet(dataTable.RowCount, False)) marking.SetSelection(rows, dataTable) Based on the Wiki Article, https://community.spotfire.com/wiki/how-perform-reset-all-markings-using-ironpython-tibco-spotfire Link to comment Share on other sites More sharing options...
Ghantasala Krishna Kowsik Posted May 21, 2018 Author Share Posted May 21, 2018 Thank you Shandilya Peddi Link to comment Share on other sites More sharing options...
sarah saci Posted June 25, 2019 Share Posted June 25, 2019 It really works. thank youso much Link to comment Share on other sites More sharing options...
sarah saci Posted June 25, 2019 Share Posted June 25, 2019 It really works. thank you Link to comment Share on other sites More sharing options...
Vaibhav Aralkar Posted January 14, 2020 Share Posted January 14, 2020 HiShandilya, While using this script I'm getting error as "nonetype object has no attribute for SetSelection". Please let me know how to resolve this. Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted January 14, 2020 Share Posted January 14, 2020 Seems like there is no marking that is returned in the below line, == marking=vis.Data.MarkingReference ==Can you add the following print statement and see what is the Marking Name, === print marking.Name ===If it errors then can you check the type of the visualization where it fails 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