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

AF SDK Reference

AFEventFrame.Lock Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFEventFrame.Lock Method
Locks this event frame so that no further changes can be made.

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.

Important note Important
Must have Admin and Write permissions to call this method.

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, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

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