General Discussions
Using String Calculation as Color Tags

So... in the past Calculation tags have been used to create Color tags.
With VT12 this can be done using the Universal IO Tag: String Calculation but it seems that most objects object to picking String calculation tags { see what I did there smile }. When picking a color for a box and you select tag and go to choose a tag, it looks for numeric tags. Interestingly, you can select the tag in the left pane of the tag browser and it works. These tags just won't populate in the right pane because it is hard filtered for numeric values.

If you change the Color tag from String Calculation to Numeric Calculation, it'll show up in the details pane and you can select it but the color value passed to the object is invalid.

Hopefully this can be addressed soon. We depend on the description of the color tag to assist in choose the correct color. It doesn't show up now when color selecting from the object.

So... in the past Calculation tags have been used to create Color tags. With VT12 this can be done using the Universal IO Tag: String Calculation but it seems that most objects object to picking String calculation tags { see what I did there :) }. When picking a color for a box and you select tag and go to choose a tag, it looks for numeric tags. Interestingly, you can select the tag in the left pane of the tag browser and it works. These tags just won't populate in the right pane because it is hard filtered for numeric values. If you change the Color tag from String Calculation to Numeric Calculation, it'll show up in the details pane and you can select it but the color value passed to the object is invalid. Hopefully this can be addressed soon. We depend on the description of the color tag to assist in choose the correct color. It doesn't show up now when color selecting from the object.
edited Sep 30 at 1:25 pm

I have no idea what you mean, but the colour selector implementation has always been odd to me.

In the color picker you can pick a color wheel, but can only enter RGB numerical values. And then in expressions you have to convert to 8-character hex codes.

However I haven't had any trouble storing colour values in calculation tags, old or the new IO tag. In the value field though, definitely not the description field.

I have no idea what you mean, but the colour selector implementation has always been odd to me. In the color picker you can pick a color wheel, but can only enter RGB numerical values. And then in expressions you have to convert to 8-character hex codes. However I haven't had any trouble storing colour values in calculation tags, old or the new IO tag. In the value field though, definitely not the description field.

The limitation is only on the tag picker in the properties dialog of graphics. I'll put in a support request about that, but the current behaviour isn't unreasonable.

Meanwhile, you can work around it easily enough. Instead of setting the data source to tag, choose expression. Remove the text of the existing color. Use the tag picker beside the expression field to select your new string-calc-mode, I/O and Calculations tag, which holds the RGB string.

The limitation is only on the tag picker in the properties dialog of graphics. I'll put in a support request about that, but the current behaviour isn't unreasonable. Meanwhile, you can work around it easily enough. Instead of setting the data source to tag, choose expression. Remove the text of the existing color. Use the tag picker beside the expression field to select your new string-calc-mode, I/O and Calculations tag, which holds the RGB string.

As an aside, you could also take your game up a notch by writing a module for a Script tag. Instead of being limited to expressions, you'll have the entire VTScada language available to help you calculate new colour combinations.

(And, yes I did see what you did there. No banjos 'round here.)

As an aside, you could also take your game up a notch by writing a module for a Script tag. Instead of being limited to expressions, you'll have the entire VTScada language available to help you calculate new colour combinations. (And, yes I did see what you did there. No banjos 'round here.)

Thanks Andrew,

It isn't a huge issue - my workaround is to just choose the tag from the left side of the tag browser (sorry - don't know the actual word for the that left side panel. Is it Tag Tree?). I'm only using colour tags because the customer has specific colours for the different aspects of the system that is part of a multi-year build. I suspect that their some of their colour choices may possibly change and this will allow me to make such changes with the click of a button pretty much.

I don't think it'd require a script tag module but I'm not exactly sure of your implementation idea in this regard. I'd like to hear more.... and take my game up a notch. smile

I appreciate the time you good folks take in answering our questions! Thanks again.

Thanks Andrew, It isn't a huge issue - my workaround is to just choose the tag from the left side of the tag browser (sorry - don't know the actual word for the that left side panel. Is it Tag Tree?). I'm only using colour tags because the customer has specific colours for the different aspects of the system that is part of a multi-year build. I suspect that their some of their colour choices may possibly change and this will allow me to make such changes with the click of a button pretty much. I don't think it'd require a script tag module but I'm not exactly sure of your implementation idea in this regard. I'd like to hear more.... and take my game up a notch. :) I appreciate the time you good folks take in answering our questions! Thanks again.
92
4
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft