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

AF SDK Reference

Product Family
Current publication

AFAttribute.FindAttribute Method (String, AFObject)

Table of Contents

AFAttribute.FindAttribute Method (String, AFObject)

AFAttribute.FindAttribute Method (String, AFObject)
Retrieves the AFAttribute object identified by the path string relative to the specified object.

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

Syntax

public static AFAttribute FindAttribute(
	string path,
	AFObject relativeFrom
)
Public Shared Function FindAttribute ( 
	path As String,
	relativeFrom As AFObject
) As AFAttribute

Dim path As String
Dim relativeFrom As AFObject
Dim returnValue As AFAttribute

returnValue = AFAttribute.FindAttribute(path, 
	relativeFrom)
public:
static AFAttribute^ FindAttribute(
	String^ path, 
	AFObject^ relativeFrom
)
static member FindAttribute : 
        path : string * 
        relativeFrom : AFObject -> AFAttribute 

Parameters

path
Type: System.String
A string containing a path name that is relative to the specified object, a fully qualified path, or a dynamic attribute path. See Path Syntax for more information.
relativeFrom
Type: OSIsoft.AF.AFObject
Specifies the object that the path may be relative to. For dynamic attributes, this parameter must indicate an AFDatabase or the dynamic attribute will not be associated with an AFDatabase.

Return Value

Type: AFAttribute
Returns the AFAttribute identified by the path.

Remarks

A path to the AFAttribute can be obtained by calling one of the GetPath Overload methods.

This method is similar to the FindObject(String) method, but will only resolve object paths to an AFAttribute. When the path only indicates a path to an element, this routine will return the DefaultAttribute of that element. See Path Syntax for a complete description of the path syntax.

Note Notes to Callers
If the specified path is a dynamic PIPoint path, this method will validate that the PIPoint exists. The AFAttribute(AFDatabase, String) constructor with a path parameter will not validate that the PIPoint exists.
Note Notes to Callers
The ShowExcludedAttributes setting will determine if excluded attributes are returned when finding attributes by path.

Version Information

AFSDK


See Also

Was this topic helpful?