Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Asset Framework and PI System Explorer (PI Server 2024 R2)

AF Update Plug-in Configurations utility

  • Last UpdatedMay 21, 2025
  • 3 minute read

The AFUpdatePlugInConfigurations utility provides a Repair, a CreateConfig, and a ReplacePIServer feature that enable you to perform bulk updates of attribute configuration strings with a single command. After you run the utility, click in PI System Explorer to see the changes.

The following table lists the available parameters for the AFUpdatePlugInConfigurations utility. Only one feature can be specified at a time in combination with the /Root, /List, and /EventFrames parameters.

Parameter

Description

/Root:string

Use in conjunction with /Repair, /CreateConfig, and /Replace parameters. Specifies the PI AF server or database on which to operate. Enclose the entire parameter string in quotation marks (" ").

/Repair[-]

Default parameter if no parameter is specified. For attributes on the PI AF server or database specified in the /Root parameter, corrects PI Point data reference attributes for which the stored configuration string has become out of synchronization with the Data Archive. This can occur for the following reasons:

  • Deleted PI points: When PI points are deleted and then recreated with the same name, the ID of the new point does not match the ID in the stored configuration string.

  • Renamed PI points: When PI points are renamed, the stored configuration string still uses the old PI point name.

  • Unresolved attributes: If the PI point to which a data reference points is not yet created, the stored configuration string does not contain the point ID.

/CreateConfig [-]

For attributes on the PI AF server or database specified in the /Root parameter, creates the PI point if it does not already exist, or updates it with any changes.

This is the same operation as when you right-click an element or attribute in PI System Explorer and choose Create or Update PI Point.

/ReplacePIServer: string

For PI Point data reference attributes on the PI AF server or database specified in the /Root parameter, redirects attributes to a different Data Archive.

Use a colon (:) to precede the existing Data Archive name. Separate the existing Data Archive name from the new Data Archive name with a semi colon (;) .

Short form: /Replace

/List [-]

Use in conjunction with /Repair, /CreateConfig, and /Replace parameters. For the PI AF server or database specified in the /Root parameter, lists all attributes to be operated on.

/EventFrames:string

Use in conjunction with /Repair, /CreateConfig, and /Replace parameters. Performs specified operation on each attribute of all event frame templates and event frames that occurred between the start and end time specified, format, using standard international date notation YYYY-MMDD. Use a semi colon to separate the start and end time.

Short form: /EF

/? or /help

Displays list of parameters

@file

Uses the specified file to provide additional input arguments. The file should contain one argument per line. Comment lines start with the '#' character.

/Repair syntax example

To repair stored configuration strings in the specified PI AF database so that they correctly map to the PI points on the Data Archive, use the following syntax:

afupdatepluginconfigurations "/Root:\\MyAFServer\MyAFDatabase" /Repair

/CreateConfig syntax example

To perform the CreateConfig operation in bulk on all attributes in a PI AF database, use the following syntax:

afupdatepluginconfigurations "/Root:\\MyAFServer\MyAFDatabase" /CreateConfig

To perform the CreateConfig operation on all attributes on a specific PI AF server, use the following syntax:

afupdatepluginconfigurations "/Root:\\MyAFServer" /CreateConfig

/ReplacePIServer syntax example

To redirect all PI point data reference attributes in a specified PI AF database to a new Data Archive, use the following syntax:

afupdatepluginconfigurations "/Root:\\MyAFServer\MyAFDatabase"
/ReplacePIServer:OldPIDataArchive;NewPIDataArchive

/EventFrames syntax example

To perform the CreateConfig operation in bulk on all event frame attributes in a PI AF database over a specific time range, use the following syntax:

afupdatepluginconfigurations "/Root:\\MyAFServer\MyAFDatabase" /EF:"2017-01-31 23:00:00";"2017-06-21 16:00:00" /CreateConfig

TitleResults for “How to create a CRG?”Also Available in