AFCase Constructor (AFAnalysis, AFTime, AFTime, AFElementTemplate)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Initializes a new instance of an AFCase with specified start and end times and
AFElementTemplate.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFCase( AFAnalysis analysis, AFTime startTime, AFTime endTime, AFElementTemplate template )
Public Sub New ( analysis As AFAnalysis, startTime As AFTime, endTime As AFTime, template As AFElementTemplate ) Dim analysis As AFAnalysis Dim startTime As AFTime Dim endTime As AFTime Dim template As AFElementTemplate Dim instance As New AFCase(analysis, startTime, endTime, template)
public: AFCase( AFAnalysis^ analysis, AFTime startTime, AFTime endTime, AFElementTemplate^ template )
new : analysis : AFAnalysis * startTime : AFTime * endTime : AFTime * template : AFElementTemplate -> AFCase
Parameters
- analysis
- Type: OSIsoft.AF.AnalysisAFAnalysis
The new AFCase is added to the specified AFAnalysis. - startTime
- Type: OSIsoft.AF.TimeAFTime
The starting time for the case. - endTime
- Type: OSIsoft.AF.TimeAFTime
The ending time for the case. - template
- Type: OSIsoft.AF.AssetAFElementTemplate
The AFElementTemplate that is to be used to create a new instance of the AFCase object. This will override the template specified by the CaseTemplate property of the specified analysis. The specified template must have its InstanceType set to AFCase. If , then the CaseTemplate of the specified analysis will be used.
Remarks
The new AFCase is automatically added to the specified analysis.
The case's StartTime and EndTime are initialized
by the specified startTime and endTime parameters.
The new case is defined to use the specified template.