AFElement.CreateDefaultPorts Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method can be used to create the default connection ports based upon the
element's type.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void CreateDefaultPorts()
Public Sub CreateDefaultPorts Dim instance As AFElement instance.CreateDefaultPorts()
public: void CreateDefaultPorts()
member CreateDefaultPorts : unit -> unit
Remarks
This method can only be called for elements which are not created from a template.
This table lists the ports that are created for each of the different element types. If
a type is not listed, then there will not be any ports created when this method is called.
| AFElementType | Port Name | AFPortType | AllowedElementTypes |
| Node | |||
| In | Input | Flow, Transfer | |
| Out | Output | Flow, Transfer | |
| Measurement | |||
| Measure | Undirected | Flow | |
| Flow | |||
| Measurement | Undirected | Measurement | |
| In | Input | Boundary, Node | |
| Out | Output | Boundary, Node | |
| Transfer | |||
| In | Input | Boundary, Node | |
| Out | Output | Boundary, Node | |