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

AF SDK Reference

AFDataCache.TrimData Method (AFAttribute, AFTime, Int32)

AFDataCache.TrimData Method (AFAttribute, AFTime, Int32)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFDataCache.TrimData Method (AFAttribute, AFTime, Int32)
Trims cached data for the AFAttribute while maintaining coverage for events from a specified time.

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

Syntax

public void TrimData(
	AFAttribute attribute,
	AFTime minTime,
	int eventsBeforeMinTime
)
Public Sub TrimData ( 
	attribute As AFAttribute,
	minTime As AFTime,
	eventsBeforeMinTime As Integer
)

Dim instance As AFDataCache
Dim attribute As AFAttribute
Dim minTime As AFTime
Dim eventsBeforeMinTime As Integer

instance.TrimData(attribute, minTime, 
	eventsBeforeMinTime)
public:
void TrimData(
	AFAttribute^ attribute, 
	AFTime minTime, 
	int eventsBeforeMinTime
)
member TrimData : 
        attribute : AFAttribute * 
        minTime : AFTime * 
        eventsBeforeMinTime : int -> unit 

Parameters

attribute
Type: OSIsoft.AF.AssetAFAttribute
The attribute to trim data for.
minTime
Type: OSIsoft.AF.TimeAFTime
The minimum time that should be kept in the cache.
eventsBeforeMinTime
Type: SystemInt32
The event count to keep before minTime. If 0 is passed, events will be kept to allow interpolation at or after minTime.

Exceptions

ExceptionCondition
ArgumentException The AFAttribute is null
KeyNotFoundException The AFAttribute has not been added to this AFDataCache.
ArgumentOutOfRangeException The eventsBeforeMinTime is negative.

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

See Also

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