6/17/2017 1:41 PM | |
Joined: 1/23/2017 Last visit: 7/1/2022 Posts: 5 Rating: (0) |
Dear all, Can any one share the procedure/c-script to change the color of an object from symbol library with multiple tags for WinCC Explorer. Say want to change the color (Green,Red & Yellow) of an object based on 2 tags conditions using c-script. I tried the below code but in run time the object turns dark black and remains unchange even tag conditions are change(0 to 1 or 1 to 0). #include "apdefap.h" long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) { #define Tag1 "R4PUE21" #define Tag2 "R4PUE22" int temp; if((Tag1==1) && (Tag2==1)){ temp=SetBackColor("Overview.pdl","Control104",RGB(255,255,0)); //Return-Type: BOOL } else if(Tag1==1&&Tag2==0) temp=SetBackColor("Overview.pdl","Control104",RGB(255,0,0)); //Return-Type: BOOL else temp=SetBackColor("Overview.pdl","Control104",RGB(100,0,0)); //Return-Type: BOOL return 0; } Thank you. ------------------------------------------------------------------------------------------ |
Last edited by: Min_Moderator at: 6/20/2017 5:27:04 PMNew subject after splitting |
|
Follow us on