RenameTag

Associated with: Wonderware Historian database items

Security permission required to access this method: Configure (on both the point or accumulator for which the tag is being renamed, and the Wonderware Historian database item)

The RenameTag method is supported by Wonderware Historian only, from the following version onwards: Wonderware Historian 2017 Update 2 with hotfix CR L00149314. (It is not supported by AVEVA Insight (formerly Wonderware Online).)

Use the RenameTag method to rename an existing tag in Wonderware Historian. Use this method to align an existing tag name in Wonderware Historian with the name of the point or accumulator with which that tag is associated, after that point or accumulator has been renamed and/or moved in the ClearSCADA database.

The RenameTag method will only rename a tag that already exists in the Wonderware Historian database with which the Wonderware Historian database item is associated. For a tag to exist in the Wonderware Historian database, HCAL must have previously exported some historic data for the point or accumulator. When ClearSCADA creates a tag in Wonderware Historian, the name of the tag is stored in the ClearSCADA database (and can be viewed using the point's or accumulator's Wonderware Historian Export status attribute). The RenameTag method compares the tag name that is stored in ClearSCADA with the current name of the point or accumulator plus the Wonderware Historian database item's Tag Names settings; if they differ, the method renames the tag in the Wonderware Historian and updates the tag name that is stored in the ClearSCADA database.

To ascertain the tag name that currently applies to a point or accumulator in ClearSCADA, view that point's or accumulator's Wonderware Historian Export Status display attribute.

To rename a tag in Wonderware Historian using the RenameTag method (so that the tag name aligns with the point's or accumulator's name in ClearSCADA):

  1. In ClearSCADA, ensure that the Wonderware Historian database item is configured with the required Tag Names settings (see Specify the Properties that are Associated with Tag Names).
  2. Ensure that the point or accumulator for which the tag is to be renamed:
  3. Use the RenameTag method in ClearSCADA to trigger Wonderware Historian to update the existing tag name. You execute the RenameTag method programmatically; for example, using the Automation Interface.

    The method has 1 argument:

    • Object (String)—Use to specify either:
      • The Full Name of the point or accumulator for which the tag is to be renamed, including that point's or accumulator's full path in the database (see Full Name)

      Or:

      • The Id of the point or accumulator for which the tag is to be renamed (see Id).

If the connection is lost between ClearSCADA and Wonderware Historian when the RenameTag method is triggered, the method will be unable to rename the tag. If this occurs, trigger the method again once the connection with Wonderware Historian is reestablished (see Connection State).

Renaming a tag has a fixed 30-second timeout to limit the effects of a slow rename on the ClearSCADA database server.


Disclaimer

ClearSCADA 2017 R3