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

AF SDK Reference

AFValue Methods

  • Last UpdatedNov 18, 2025
  • 6 minute read
AFValue Methods

The AFValue type exposes the following members.

Methods

  NameDescription
Public method
CompareTo(Object)
Compares this instance with a specified Object.
Public method
CompareTo(AFValue)
Compares this instance with a specified AFValue.
Public method
Convert(UOM)
Returns a new AFValue in the specified UOM.
Public methodCode example
Convert(UOMGroup)
Returns a new AFValue in the UOM specified by the UOMGroup.
Public method
ConvertForAttribute
Converts the current value using the type and units of measure configured for the specified attribute.
Public methodStatic member
Create(AFAttribute, Double, AFTime, UOM, AFValueStatus, Object)
This method will create an AFValue object of Double type that is associated with an AFAttribute.
Public methodStatic member
Create(AFAttribute, Int32, AFTime, UOM, AFValueStatus, Object)
This method will create an AFValue object of Int32 type that is associated with an AFAttribute.
Public methodStatic member
Create(AFAttribute, Single, AFTime, UOM, AFValueStatus, Object)
This method will create an AFValue object of Single type that is associated with an AFAttribute.
Public methodStatic member
CreateSystemNoDataFound
This method will create an AFValue object with a system state of NoData as its AFEnumerationValue with a Bad status that is associated with an AFAttribute.
Public methodStatic member
CreateSystemStateValue(AFSystemStateCode, AFTime)
This method will create an AFValue object with a system AFEnumerationValue as its value with a Bad status that is not associated with an AFAttribute.
Public methodStatic member
CreateSystemStateValue(AFAttribute, AFSystemStateCode, AFTime)
This method will create an AFValue object with a system AFEnumerationValue as its value with a Bad status that is associated with an AFAttribute.
Public methodStatic member
DefaultValue
Gets the default value for the specified type.
Public methodStatic member
DisplayValue(Decimal, Int32, IFormatProvider)
Displays the Decimal value based upon the specified number of display digits.
Public methodStatic member
DisplayValue(Double, Int32, IFormatProvider)
Displays the Double value based upon the specified number of display digits.
Public method
DisplayValue(Int32, IFormatProvider, Boolean)
Displays the Value based upon the value's Type with the option to add the value's UOM abbreviation.
Public methodStatic member
DisplayValue(Object, Int32, IFormatProvider)
Displays the Object value based upon the specified number of display digits.
Public methodStatic member
DisplayValue(Single, Int32, IFormatProvider)
Displays the Single value based upon the specified number of display digits.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public method
Equals(AFValue)
Indicates whether the current object is equal to another object of the same type.
Public method
FromPIValue(Object) Obsolete.
This method sets the value of this AFValue object from a PISDK.PIValue object.
Public method
FromPIValue(Boolean, Object) Obsolete.
This method sets the value of this AFValue object from a PISDK.PIValue object.
Public method
FromPIValue(Object, Type, Object, AFEnumerationSet, UOM) Obsolete.
This method sets the value of this AFValue object from a PISDK.PIValue object, converting to the appropriate type as necessary.
Public methodCode example
GetAnnotation
Gets the annotation associated with this AF value.
Public methodStatic member
GetAnnotations
Gets the annotation associated for each AF value in the specified list.
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.
(Overrides ObjectGetHashCode.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
Persist
This method returns the persistence string for the object.
Public methodCode example
SetAnnotation
Associates an annotation with this AF value.
Public method
ToPIValue Obsolete.
This method returns the value of this object as a new PISDK.PIValue object.
Public method
ToPIValue(Object) Obsolete.
This method sets the value of the passed in PISDK.PIValue object to the value of this AFValue object.
Public method
ToString
Returns a String that represents the current object.
(Overrides ObjectToString.)
Public method
ValueAsDouble
Returns the value held by this AFValue as a Double. The value will be converted if possible. If the value cannot be converted an exception will be throw. The value can be checked before performing the conversion using the Type or TypeCode property.
Public method
ValueAsInt32
Returns the value held by this AFValue as a Int32. The value will be converted if possible. If the value cannot be converted an exception will be throw. The value can be checked before performing the conversion using the Type or TypeCode property.
Public method
ValueAsSingle
Returns the value held by this AFValue as a Single. The value will be converted if possible. If the value cannot be converted an exception will be throw. The value can be checked before performing the conversion using the Type or TypeCode property.

See Also

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