Below is a sample script which help to mark a visualization based on the unmarked rows in another visualization
Introduction
Below is a sample script which help to mark a visualization based on the unmarked rows in another visualization
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import * from Spotfire.Dxp.Application.Visuals import * dataTable=Document.Data.Tables["table1import"] destDataTable=Document.Data.Tables["table2import"] tablePlot=vis.As[TablePlot]() baseRows=tablePlot.Data.MarkingReference.GetSelection(dataTable) baseIndexSet=baseRows.AsIndexSet() print baseIndexSet.Count #create a clone of readonly index set setIndexSet=baseIndexSet.AsWritable().Not() print setIndexSet.Count #Set the above marking to the new vis destTablePlot=vis2.As[TablePlot]() marking=destTablePlot.Data.MarkingReference rowSelection=RowSelection(setIndexSet) marking.SetSelection(rowSelection,destDataTable)
References
- API Reference: DataMarkingSelection.GetSelection
- API Reference: IndexSet
- API Reference: DataMarkingSelection.SetSelection
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.