Kkula
Browse Questions » WinCC Unified Systems: Template Using 'color' property Within Automation Code

About User

Questions Asked: 24.4K

Answers Given: 0

0
  • Open

WinCC Unified Systems: Template Using 'color' property Within Automation Code

Hi!
I Created a faceplate, this faceplate has 2 'color' properties:
"ColorDefault' and "ColorActive"
I want  to change the background color of a square in this faceplate using a script:
var value;
let OK = Tags("OK");
let OK_value = OK.Read();
var DefaultColor = Faceplate.Properties.ColorDefault;
var ActiveColor = FaceplateProperties.ColorActive;
if (OK_value) {
value = ActiveColor;
} else {
value = DefaultColor;
}
return value;
(see image)
But it is not working..
Can someone tell me what I am doing wrong?

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(0)