AFDataCache.TrimData Method (AFAttribute, AFTime)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Trims any cached data for the AFAttribute at or before the specified AFTime.
Namespace: OSIsoft.AF.Data
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void TrimData( AFAttribute attribute, AFTime trimToTime )
Public Sub TrimData ( attribute As AFAttribute, trimToTime As AFTime ) Dim instance As AFDataCache Dim attribute As AFAttribute Dim trimToTime As AFTime instance.TrimData(attribute, trimToTime)
public: void TrimData( AFAttribute^ attribute, AFTime trimToTime )
member TrimData : attribute : AFAttribute * trimToTime : AFTime -> unit
Parameters
- attribute
- Type: OSIsoft.AF.AssetAFAttribute
The attribute to trim data for - trimToTime
- Type: OSIsoft.AF.TimeAFTime
The time to trim up to. Any cached values at or before the specified time will be removed.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The AFAttribute is null |
| KeyNotFoundException | The AFAttribute has not been added to this AFDataCache. |