I have user control with custom properties in my TC3 HMI(TE2000) project. In graphic designer it's easy to assign value to property or bind it to symbol.
However, I can't find how to assign value to custom property from the JS/TS function. Those user controls are already exist in the view. The instance is of type user control host. I've checked that class and no suitable method for assigning values to the custom property. Any workaround without creating new instances of user control from the script?
TcHmi.Controls.get('Id of the Control').getCustomPropertyName();
TcHmi.Controls.get('Id of the Control').setCustomPropertyName(value);
In the getCustomPropertyName()
and setCustomPropertyName(value)
methods, the first letter needs to be capitalized; for example: If the property name is customValue => getCustomValue() / setCustomValue(value)
.
If you do console.log(TcHmi.Controls.get('Id of the Control'))
, it will show you the list of getter and setter methods you can use.