first of all my setup:
OS: Win7 Pro x64
WinCC OA: 3.11+SP1, Patch6
I want to set a reference-button's label dynamic by $-Parameter. When I place the reference via Gedi, $Param's initial value is $Param. So far so good. Using the code following next, i get log warnings (btw. "Syntax error" results in a warning msg?):
WCCOAui (2), 2013.07.29 17:56:03.898, CTRL, WARNING, 51, Parameter incorrect, did not find the $-parameter, $BOILER_NAME
WCCOAui (2), 2013.07.29 17:56:03.898, PARAM,WARNING, 81, Syntax error, $-Parameter, Module: _QuickTest_
Panel: xxx\\panels\\newPanel.pnl []
In reference: objects\\btnBcsParameter.pnl Group: 2 named: "PANEL_REF2"
Code: Select all
// [(Panel)] [0] - [Initialize]
main()
{
DebugTN(isDollarDefined("$BOILER_NAME"));
setValue("btnBcsParam", "text", "BCS" + ((isDollarDefined("$BOILER_NAME") && getDollarValue("$BOILER_NAME") != "")
? " (" + $BOILER_NAME + ")"
: ""));
}
Tried several variant (using variables, if-condition,working only with getDollarValue -> Gedi does not find $-Param -> no value setting possibility...) - what would you suggest?