SetTagValue

Sets the value of the specified tag in the project tags database.

Function Group Execution Windows Embedded Thin Client
SetTagValue Tags Database Synchronous Supported Supported Supported

Syntax

SetTagValue( "strTagName", TagValue )
strTagName
The name of the tag that you want to set.
Note: The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag.
TagValue
The new value to be set to the specified tag.

Returned value

Value Description
−1 Invalid tag name
0 No error

Examples

Tag Name Expression
TagA SetTagValue( "TagA", "Hello" ) // Return = Hello
TagA SetTagValue( "TagA", 123 ) // Return = 123
TagA TagB = 15 SetTagValue( "TagA", TagB ) // Return = 15