Jump to content
  • How to Set markings to a specific color in Spotfire® using IronPython scripting


    This article explains how to Set markings to a specific color in Spotfire® using IronPython scripting

    Introduction

    This article show how we are able to set markings to a specific color using IronPython scripting

    Code sample

     # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
     
     from Spotfire.Dxp.Data import DataManager, DataTable, DataType, DataTableSaveSettings, IndexSet, RowSelection
     from array import array
     
     # Sets markings colour to purple: RGB = 145,39,143
     markingsColor = array("i", [145, 39, 143])
     
     # Set all markings to purple
     def setMarkingColors():
         for marking in Application.GetService[DataManager]().Markings:
             marking.Color = marking.Color.FromArgb(markingsColor[0],markingsColor[1],markingsColor[2])
         
     setMarkingColors()
     

    References

     

    License:  TIBCO BSD-Style License

    Back to IronPython Scripting in Spotfire Examples:  https://community.spotfire.com/s/article/IronPython-Scripting-in-Spotfire

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...