Hey everybody,
I'm trying to use a WinCC script to set several variables that have a similar naming convention. (In the real application, "myInteger" changes based on user input). I'm using the code below, which compiles successfully -- however, "setThis" is always set to zero. (Even though the tag "VARIABLE-1" exists and is initialized to a non-zero value).
What gives??
Code:
dim tagString, setThis, myInteger
myInteger = 1
tagString = "VARIABLE-" & CStr(myInteger)
setThis = SmartTags(tagString)
I'm trying to use a WinCC script to set several variables that have a similar naming convention. (In the real application, "myInteger" changes based on user input). I'm using the code below, which compiles successfully -- however, "setThis" is always set to zero. (Even though the tag "VARIABLE-1" exists and is initialized to a non-zero value).
What gives??
Code:
dim tagString, setThis, myInteger
myInteger = 1
tagString = "VARIABLE-" & CStr(myInteger)
setThis = SmartTags(tagString)