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

AF SDK Reference

AFAnalysisRule Class

  • Last UpdatedNov 18, 2025
  • 11 minute read
AFAnalysisRule Class
The AFAnalysisRule defines the information needed for an analysis of the data within a case, and executes that analysis.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AF.AnalysisAFAnalysisRule

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

Syntax

[SerializableAttribute]
public abstract class AFAnalysisRule : AFObject, 
	IComparable<AFAnalysisRule>, IAFTrace, IAFLocalizedErrorProvider
<SerializableAttribute>
Public MustInherit Class AFAnalysisRule
	Inherits AFObject
	Implements IComparable(Of AFAnalysisRule), IAFTrace, 
	IAFLocalizedErrorProvider

Dim instance As AFAnalysisRule
[SerializableAttribute]
public ref class AFAnalysisRule abstract : public AFObject, 
	IComparable<AFAnalysisRule^>, IAFTrace, IAFLocalizedErrorProvider
[<AbstractClassAttribute>]
[<SerializableAttribute>]
type AFAnalysisRule =  
    class
        inherit AFObject
        interface IComparable<AFAnalysisRule>
        interface IAFTrace
        interface IAFLocalizedErrorProvider
    end

The AFAnalysisRule type exposes the following members.

Properties

  NameDescription
Public property
Analysis
This property returns the analysis that owns this object.
Public property
AnalysisRules
This read-only property returns the child analysis rules.
Public property
AnalysisTemplate
This property returns the analysis template that owns this object.
Public property
ConfigString
This property represents the current configuration of the Analysis Rule as a string suitable for displaying to an end-user and/or setting its configuration.
Public property
CurrentCase
This property returns the current case associated with the AnalysisRule.
Public property
Database
This read-only property returns the AFDatabase where this object is defined.
Public property
Description
Read-only property that provides more detailed description of the object.
Public property
DisplayString
Returns the configuration of the AFAnalysisRule for display purposes.
Public property
EditorType
This method returns the Type of the editor that is used to configure this analysis rule.
Public property
HasChildren
This read-only property returns if the analysis rule has child analysis rules.
Public property
ID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IsConfigured
This method returns if the analysis rule instance is properly configured.
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
IsInitializing
Indicates that the AFAnalysisRule is in the process of being initialized.
Public property
Name
Read-only property that identifies the name of the object.
Public property
Parent
Returns the parent analysis rule which owns this analysis rule.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
PlugIn
This read-only property returns the AFPlugIn used to create this instance of the plugin.
Public property
SimplifiedConfigString
This property presents a simplified view of the current configuration of the Analysis Rule that is easier for users to edit and that does not contain redundant information (e.g. IDs for resolution).
Public property
SimplifiedVariableMapping
This property represents a simplified view of the current variable mapping for the Analysis Rule. Setting this property will update the VariableMapping string with updated IDs.
Public property
SupportedBehaviors
Defines the behavior supported by this analysis rule. If the analysis rule supports child analysis rules, their supported behavior is accounted for.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)
Public property
VariableMap
A collection of AFVariableMappingDatas defined for this AFAnalysisRule. Modifying this collection is preferred to editing the VariableMapping string directly.
Public property
VariableMapping
This property represents the current variable mapping for the Analysis Rule.

Methods

  NameDescription
Public method
ClearVariableMapForPasteOperation
Clear the variable map logic when pasting the analysis rule.
Public method
CollectElements
This method collects the elements that are active for the current case.
Public method
CollectInputs
This method is an optional method which allows the analysis rule to obtain the input values necessary to start an analysis.
Public method
CollectTransfers
This method collects the transfers that are active for the current case.
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public method
DefaultSaveConfigChanges
Called by the protected SaveConfigChanges method to perform the default actions to save the configuration changes.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public methodStatic member
FindAnalysisRule(AFAnalysis, Guid)
Retrieves the AFAnalysisRule object from the AFAnalysis with the specified unique identifier.
Public methodStatic member
FindAnalysisRule(AFAnalysisTemplate, Guid)
Retrieves the AFAnalysisRule object from the AFAnalysisTemplate with the specified unique identifier.
Public method
GetAttributeVariables
Returns all the attribute variables.
Public method
GetConfiguration
Get the configuration defined by this AFAnalysisRule for its current target.
Public method
GetConfiguration(AFObject)
Get the configuration defined by this AFAnalysisRule for the specified target.
Public method
GetEditorT
Returns an instance of an editor of the specified type.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from AFObject.)
Public method
GetInputs
This method provides the analysis rule a mechanism to specify the attributes it will use during its analysis.
Public method
GetLocalizedError
This method gets a localized string for errors associated with the AFAnalysisRule.
Public method
GetOutputs
This method provides the analysis rule a mechanism to specify the attributes it will output during its analysis.
Public methodStatic member
GetOutputsForAnalyses
Returns a mapping of AFAttributes to the AFAnalysis that outputs values to them.
Public methodStatic member
GetOutputsForAnalysisTemplates
Returns a mapping of AFAttributeTemplates to the AFAnalysisTemplate that outputs values to them.
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
GetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public methodStatic member
GetTarget
Get the target associated with the specified AFAnalysisRule.
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
GetVariableDefinitions
Get the configuration defined by this AFAnalysisRule
Public method
GetVariableDefinitions(AFObject)
Get the configuration defined by this AFAnalysisRule.
Public methodStatic member
IsCompatibleAsOutput
This method returns if the specified AFAttributeTemplate or AFAttribute is compatible as an output.
Public methodStatic member
IsModelAnalysisRule
Determines if the specified AFPlugIn only supports an analysis on an AFModel target.
Public method
IsTraced
Indicates if a specified level is being traced.
Public method
MapVariable(String, AFAttribute)
Maps a variable to the specified AFAttribute.
Public method
MapVariable(String, String)
Maps a variable to a new attribute name.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
Publish
The output AFAttribute values of the analysis case run are published to the locations specified by the attribute's data reference configuration.
Public method
RecoverAnalysisRuleState
Initializes the analysis rule state using the specified state IAFAnalysisRuleState that needs to be recovered for this AFAnalysisRule and its children.
Public method
RefreshConfigurationAndVariableMapping
Refresh the configuration string and variable mapping of the AFAnalysisRule, and it's child analysis rules.
Public method
Reset
Resets any dynamic state associated with the analysis rule.
Public method
Run
This method executes the analysis and generates analysis results.
Public method
Run(IAFAnalysisRuleState)
Runs the analysis using the specified IAFAnalysisRuleState object.
Public method
SetSaveConfigChangesHandler
Set the handler used for saving ConfigString changes.
Public methodStatic member
SupportsChildAnalysisRule
Determines if the specified AFPlugIn supports adding child analysis rules.
Public method
ToString
Returns a String that represents the current object.
(Overrides AFObjectToString.)
Public method
TraceData
Output a data trace event.
Public method
TraceDetail
Output a detail trace event.
Public method
TraceError
Output an error trace event.
Public method
TraceEvent(AFTraceSwitchLevel, String)
Output a trace event with a message.
Public method
TraceEvent(AFTraceSwitchLevel, String, Int32)
Output a trace event with a message and a duration.
Public method
TraceEvent(AFTraceSwitchLevel, String, Object)
Output a trace event as a formatted message with a variable number of arguments.
Public method
TraceInformation
Output an information trace event.
Public method
TraceSummary
Output a summary trace event.
Public method
TraceWarning
Output a warning trace event.

Remarks

Analysis Rules are defined and implemented by AFPlugIns which inherit from this abstract class.

Version Information

AFSDK


See Also

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