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

AF SDK Reference

AFAttribute.SetConfigStrings Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAttribute.SetConfigStrings Method
Set the ConfigString values for the specified list of attributes.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static void SetConfigStrings(
	IList<AFAttribute> attributes,
	IList<string> configStrings
)
Public Shared Sub SetConfigStrings ( 
	attributes As IList(Of AFAttribute),
	configStrings As IList(Of String)
)

Dim attributes As IList(Of AFAttribute)
Dim configStrings As IList(Of String)

AFAttribute.SetConfigStrings(attributes, 
	configStrings)
public:
static void SetConfigStrings(
	IList<AFAttribute^>^ attributes, 
	IList<String^>^ configStrings
)
static member SetConfigStrings : 
        attributes : IList<AFAttribute> * 
        configStrings : IList<string> -> unit 

Parameters

attributes
Type: System.Collections.GenericIListAFAttribute
The list of attributes that will be updated with the corresponding ConfigString in the configStrings list.
configStrings
Type: System.Collections.GenericIListString
The list of new ConfigString values for the corresponding AFAttribute in the attributes list.

Exceptions

ExceptionCondition
ArgumentNullException This exception is thrown if either of the parameters is .
ArgumentOutOfRangeException This exception is thrown if the number of items in the attributes and configStrings lists do not match.
NotSupportedException This exception is thrown when connected to a PI AF Server 2.5 or earlier.
SecurityException This exception is thrown when the user does not have Write permission on one of the attributes in the specified list.

Remarks

This method will set the ConfigString values for each of the attributes without requiring the AFElement to be checked out. Setting a ConfigString in the configStrings list to or an empty string will reset the attribute to the template's default configuration. This would be more efficient than calling ResetToTemplate on each attribute.

Important note Important
This method is only supported on PI AF Server 2.6 or later. If the AFElement that owns the attribute being updated is checked out by another user, then the changes may be lost when the other user checks in the AFElement.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in