Jump to content
  • How to determine the client type (Analyst or Web player) the user is running in Spotfire® using IronPython scripting.


    This article provides code snippet of how to determine the client type (Analyst or Web player) the user is running in Spotfire® using IronPython scripting.

    Introduction

    It may be a requirement from a Script Control Button or a Custom Extension Tool to determine the type of client the user is running i.e. Analyst or Web Player. There is no direct API for this. However we may use the Application.GetType() method to fetch the type of the current instance.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Framework.ApplicationModel import NotificationService
    
    notify = Application.GetService[NotificationService]()
    applicationType =Application.GetType().ToString()
    notify.AddInformationNotification ("Application Type","",applicationType)
    
    # It returns:
    # Spotfire.Dxp.Application.RichAnalysisApplication for Analyst
    # Spotfire.Dxp.Web.WebAnalysisApplication for Web Player
     

    References

    License:  TIBCO BSD-Style License

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...