CreateTag method

Creates an HMI tag and returns a Tag object that represents the newly-created tag.
By default, a memory tag is created. The tag's data source can be changed from memory to device using the
SourceType
property.
Syntax
Set
Tag
=
TagDB
.
CreateTag
(
TagName
,
TagType
)
where
Tag
is the name of a Tag object or an expression that evaluates to a Tag object.
TagDB
is the global variable
TagDB
. You can also use a variable you have defined as a TagDB object or an expression that evaluates to a TagDB object.
TIP:
If you are not using
FactoryTalk View SE
's VBA, the global variables will not be automatically created and you will have to define your own object variables.
TagName
is the fully qualified name of the tag, that is, the path and tag name such as
folder1\tag1
.
If the folder specified as part of
TagName
does not exist, it will be created automatically when the tag is created.
TagType
is a value of
TagType
constant or an expression that evaluates to the value of
TagType
constant. It specifies the tag type to create.
Remarks
  • When operating a large amount of data, we recommend that you use the block mode to improve the performance.
  • Avoid opening the Tags editor before the operation finishes. Otherwise, errors may occur.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal