Lesson 3 hints and tips
- Last UpdatedSep 29, 2022
- 1 minute read
- PI System
- AF SDK 2.10
- PI Server
For exercises 4 and 5, use the GetAttributes() helper function to obtain an AFAttributeList, then use AFAttributeList.Data to make the bulk calls.
For exercise 4, do not use RecordedValues() and then compute the average in your code. Instead, use the Summaries() method to allow PI Data Archive to compute the average. Then, return only the average to the client.
For exercise 5, the existing archived values must be removed before inserting new values. Use the AFListData.UpdateValues in conjunction with AFUpdateOption.Remove.