Ghantasala Krishna Kowsik Posted May 18, 2018 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
Shandilya Peddi Posted May 18, 2018 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
Vaibhav Aralkar Posted January 14, 2020 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.
Shandilya Peddi Posted January 14, 2020 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
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