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

PI Powershell

AddAFEventFrame Class

  • Last UpdatedDec 15, 2025
  • 4 minute read
AddAFEventFrame Class

Add an AF Event Frame(s)

The Add-AFEventFrame cmdlet creates a new AF Event Frame

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellAddAFEventFrame

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[CmdletAttribute("Add", "AFEventFrame", SupportsShouldProcess = true)]
public class AddAFEventFrame : OSICmdletBase
<CmdletAttribute("Add", "AFEventFrame", SupportsShouldProcess := true)>
Public Class AddAFEventFrame
	Inherits OSICmdletBase

Dim instance As AddAFEventFrame
[CmdletAttribute(L"Add", L"AFEventFrame", SupportsShouldProcess = true)]
public ref class AddAFEventFrame : public OSICmdletBase
[<CmdletAttribute("Add", "AFEventFrame", SupportsShouldProcess = true)>]
type AddAFEventFrame =  
    class
        inherit OSICmdletBase
    end

The AddAFEventFrame type exposes the following members.

Constructors

  NameDescription
Public method
AddAFEventFrame

Properties

  NameDescription
Public property
AFAnalysis

AF Analysis that created the AF Event Frame

Public property
AFDatabase

AF Database to which to add the AF Event Frame

Public property
AFElementTemplate

AF Element Template which to base the AF Event Frame

Public property
CheckIn

Check in changes immediately

Public property
Description

Description of the AF Event Frame to add

Public property
EndTime

End time of the AF Event Frame to add

Public property
IsRoot

Is the AF Event Frame owned by the AF Database

Public property
IsTemporary

Is the AF Event Frame to add marked as temporary

Public property
Name

Name of the AF Event Frame to add

Public property
StartTime

Start time of the AF Event Frame to add

Examples

Add-AFEventFrame -Name "Equipment Maintenance Downtime" -Description "Manual downtime event" -StartTime "1-Nov-2017 08:00:00" -EndTime "1-Nov-2017 17:00:00" -CheckIn -AFDatabase $afDB

Where:

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

Creates and Event Frame in the past representing a planned downtime. The event frame is not tied to an AF Element Template and was not created by an analysis. The change is checked in immediately.

Examples

Add-AFEventFrame -Name "Boiler Downtime" -Description "Boiler downtime event" -StartTime "4-Nov-2017 08:25:00" -EndTime "4-Nov-2017 08:55:00" -CheckIn -AFAnalysis $afAnalysis -AFDatabase $afDB

Where:

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

$afElement = Get-AFElment -Name Boiler1 -Refresh -AFDatabase $afDB

$afAnalysis = $afElement.Analyses[0]

Creates an AF Event Frame in the past representing a downtime for "Boiler1". The event frame is marked as being created by the AF Analysis on the Boiler1 element. The change is checked in immediately.

See Also

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