Can you dynamically change DeltaV Operator Theme Color set?

Has anyone been able to determine if the 4 default themed color sets in version 11 can be changed dynamically?  For example, could there be something added to the toolbar so that an operator can select between Shades of Silver, Shades of Dark Blue, Shades of Tan, etc based on their color preference?  Anything standard to accomplish this, or would something like this have to be custom built?

From my looking around, I haven't seen anything that could dynamically change the themed color set.  I was thinking that it could be accomplished in the following way though:

• Toolbar radio buttons to select the color palette.  This would write to a global variable a value of 1, 2, 3, etc. to be used as a "palette identifier".

• Then instead of having 1 color table for each palette with all the colors defined in that 1 table like it is currently, you would have to create a color table for each defined color.  For example, create a color table named "theme_background_color " and define 1 as the silver background color, 2 as the dark blue background color, and 3 as the tan background color.  Same thing for a pipe color, vessel color, page link color, etc.

• Then your objects/dynamos/etc would have to reference the individual color tables and display the color as defined in the "palette identifier" global variable.

Thoughts?  Any better ideas?  Thought I would check with other DV users before getting started down this path.

Thanks!

10 Replies

  • There is a document on the DeltaV Application Exchange that explains how to do this.  

    www2.emersonprocess.com/.../Interactive.aspx

    deltav.com/.../application.asp

  • In reply to David Nelson:

    Strangely I was looking at doing the same today and have come up with a programmatic way to some of what you've requested.

    Similar to the document offered by David, I alter picture backgrounds in the initialise script of the picture I want to change the background colour of. But slightly differently I use the Theme_Colors threshold table to extract the colour code for setting the BackgroundColor, rather than using a constant.

    Instead of using custom created constant values as per the document I pass the colour name to the threshold table as the inputvalue and extract the rgb number as the OutputValue.

    It goes something like this.

    .....

    Dim color As Long

    Frsvariables.Theme_Colors.InputValue = "Picture background"

    Color = Frsvariables.Theme_Colors.OutputValue

    Me.Backgroundcolor = Color

    ......

    Is there a slicker frs function for this?

    The Theme_Colors threshold table has input string values and output numerical RGB values. If you want to know what all the valid entries are just select the custom script of the Theme_Colors threshold table and note down the valid string values. Their names are quite explanatory, at least in English.

    Possibly mentioned in other documents. You can also use the Frsvariables.ThemeColors.gs_xxxxx string value constants if you want to add animation to graphical elements based on the Theme_Colors shared threshold table. For example if you want on the fly Theme changes you need to develop your static label text to work on a variety of background colours, from this you can see a fully dynamic Themed graphic needs to animate pretty much everthing if you want things to give good contrasts for any combination.

    I noted that out of the box DeltaV doesn't alter toolbar or alarm banners or faceplate displays in sympathy with Theme colours which can give some jarring contrasts. I am planning to develop our Banners and faceplates to be more harmonious with the Themes. For the light Themes Light Blue, Silver and Tan, it's not that critical but for the Dark Blue Theme it's less than optimal.

    Does anyone know if PCSD takes Themes further than out of the box DeltaV for example for the Dark Blue Theme has bright banners out of the box?

    Another consideration, some of the activex controls also appear only to be altered by changing the underlying windows colour theme. Controls such as the alarm summary control and batch controls allow some colour alteration but not fully.

    With DeltaV as is (at v12) I would envisage that switching fully between themes will require a small degree of manual and semi automatic intervention.

    I got this far today, very much work in progress, but there is some promise. I chose Dark Blue theme as it highlights the issues most noticably.

    Has anyone actually seen the Dark Blue theme in practice on a live operational plant?

  • In reply to David Nelson:

    Has anyone tried to implement this on a DV v12 system? I get an error when I follow the instructions provided on the application exchange.

    Chris Spencer

  • In reply to Chris Spencer:

    Yes our midwest engineering center has been doing this since v11. Are you using your own graphics library, PCSD or just Out of the Box?

    PCSD makes this process easier because they already have the theme color tables and some of the logic needed. If you don't then you will need copies of the tables in User (or SIGlobals which is where PCSD has them) and some code as the application exchange describes but our logic is a little different. I suspect that the error you are getting is because of things that don't exists, named differently or aren't referenced properly.

    When and what error you are getting?
    Select the VB scripting that was added and go to VB menu item Debug/Compile Project_xxxx (xxxx will be User or SIGlobals depending on where the logic was put), do you get any error?
  • In reply to Matt Stoner:

    Matt,

    Thank you for your reply.

    We are using a PCSD library so color tables, etc. already exists.  I believe you are correct when you say something may not be referenced properly.  I do get an error when I compile the SIGlobals project, as seen in the screen capture:

    This may be an easy fix but my coding is quite rusty.  To me, it looks like "Me" can only be used in Class Modules, which the "modDynTheme" module I created is not.

    Thank you for your help!

    Chris Spencer

  • In reply to Chris Spencer:

    Chris,

    Looks like you have v12 PCSD graphics so do the following:

    Create a Rectangle on a graphic (Picture, Toolbar, etc) - later you can change this to a combobox if you want
    Right click on this rectangle and select Edit Script
    Add the below three lines:
    SIGlobals.gn_ThemeSelection.CurrentValue = 3
    Project_SIGlobals.hcdInitializeColorTables SIGlobals.gn_ThemeSelection.CurrentValue
    frszTbResetLayout Me

    The number 3 corresponds to Dark Blue Theme, 0=Silver, 1=Tan, 2=Light Blue and 4=Dark Gray (only for v13 PCSD).

    See if this gets you to change the theme without errors.
  • In reply to Matt Stoner:

    That worked Matt, thank you for your help!
    Just to be clear for those that read this later, when using a PCSD graphics library the rectangle/button and corresponding code by Matt is all that's needed. I removed the code module and variable that the document "DeltaV Themes on the Fly" had me create. Please note I had to duplicate the Threshold tables (i.e. Theme_Colors_Dark_Blue, etc...) from SIGlobals into User to get this to work.

    Chris Spencer

  • In reply to Chris Spencer:

    Chris,

    You shouldn't have needed to duplicate the table to user unless you were making custom changes to the colors. If no custom changes it should have loaded the Dark Blue theme from SIGlobals to be used by the graphics.

    So let me know why you needed to duplicate to User to get it to work.

    Matt
  • In reply to Matt Stoner:

    Originally, before I duplicated the threshold tabled in User, when I switched themes on an Operator workstation the theme selected would not load. This is what led me to believe the tables needed to be in the User folder. Being that I wasn't completely sure why the threshold tables needed to be duplicated in User, I conducted a test. I deleted the duplicated threshold tables in User from my Pro station to see if it still worked, and it does. For good measure, I also restarted my Pro station and the theme still load properly. So, I retract my statement that the threshold tables need to be duplicated in User.

    Chris Spencer

  • In reply to Chris Spencer:

    OK, we have been doing this since v11 and didn't have to do that unless we needed customizations and then we did replicate them.

    Great that you have it working now, you can now customize the "how" you change the theme any way you like. We use a combox box with the theme selections and a confirmation prompt after the theme selection has changed.