AFEventFrame.Lock Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void Lock()
Public Sub Lock Dim instance As AFEventFrame instance.Lock()
public: void Lock()
member Lock : unit -> unit
Remarks
This method will lock this AFEventFrame so that no further changes can be made by turning off Write permission. Once the event frame is locked, no further changes are allowed even if the user has Admin permission. The only exception is an administrator is allowed to unlock the event frame by calling the Unlock method.
This method will automatically check out the object (see CheckOut) if it is not currently checked out for modifications. Once the event frame is locked, the change needs to be saved to the server using the ApplyChanges or CheckIn methods.
If the AFEventFrameCaptureValues method is called before this method, AreValuesCaptured will remain even when a new AFAttributeTemplate is added and checked-in.