AFConnections.IsValidConnection Method (Boolean, Boolean, AFElement, AFPort, AFElement, AFPort, String)
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now obsolete.
This method checks if a valid connection can be created between the
specified source and destination ports.
Namespace: OSIsoft.AF.Modeling
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[BrowsableAttribute(false)] [ObsoleteAttribute("Use AFConnections.IsValidConnection(AFPort sourcePort, AFPort destinationPort). There is no need to specify both a element and its port.")] public bool IsValidConnection( bool checkSourceMaxConnections, bool checkDestinationMaxConnections, AFElement sourceElement, AFPort sourcePort, AFElement destinationElement, AFPort destinationPort, out string errMsg )
<BrowsableAttribute(false)> <ObsoleteAttribute("Use AFConnections.IsValidConnection(AFPort sourcePort, AFPort destinationPort). There is no need to specify both a element and its port.")> Public Function IsValidConnection ( checkSourceMaxConnections As Boolean, checkDestinationMaxConnections As Boolean, sourceElement As AFElement, sourcePort As AFPort, destinationElement As AFElement, destinationPort As AFPort, <OutAttribute> ByRef errMsg As String ) As Boolean Dim instance As AFConnections Dim checkSourceMaxConnections As Boolean Dim checkDestinationMaxConnections As Boolean Dim sourceElement As AFElement Dim sourcePort As AFPort Dim destinationElement As AFElement Dim destinationPort As AFPort Dim errMsg As String Dim returnValue As Boolean returnValue = instance.IsValidConnection(checkSourceMaxConnections, checkDestinationMaxConnections, sourceElement, sourcePort, destinationElement, destinationPort, errMsg)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"Use AFConnections.IsValidConnection(AFPort sourcePort, AFPort destinationPort). There is no need to specify both a element and its port.")] bool IsValidConnection( bool checkSourceMaxConnections, bool checkDestinationMaxConnections, AFElement^ sourceElement, AFPort^ sourcePort, AFElement^ destinationElement, AFPort^ destinationPort, [OutAttribute] String^% errMsg )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("Use AFConnections.IsValidConnection(AFPort sourcePort, AFPort destinationPort). There is no need to specify both a element and its port.")>] member IsValidConnection : checkSourceMaxConnections : bool * checkDestinationMaxConnections : bool * sourceElement : AFElement * sourcePort : AFPort * destinationElement : AFElement * destinationPort : AFPort * errMsg : string byref -> bool
Parameters
- checkSourceMaxConnections
- Type: SystemBoolean
If , check the source port to determine if the maximum number of connections will be exceeded. If , this check will not be performed. You would not want to perform this check if you are attempting to check if the destination could be changed to a different port before removing the current connection. Normally this parameter should be set to . - checkDestinationMaxConnections
- Type: SystemBoolean
If , check the destination port to determine if the maximum number of connections will be exceeded. If , this check will not be performed. You would not want to perform this check if you are attempting to check if the source could be changed to a different port before removing the current connection. Normally this parameter should be set to . - sourceElement
- Type: OSIsoft.AF.AssetAFElement
The source element of the connection. - sourcePort
- Type: OSIsoft.AF.ModelingAFPort
The source AFPort object of the connection. - destinationElement
- Type: OSIsoft.AF.AssetAFElement
The destination element of the connection. - destinationPort
- Type: OSIsoft.AF.ModelingAFPort
The destination AFPort object of the connection. - errMsg
- Type: SystemString
The returned error message if the connection is invalid.
Return Value
Type: BooleanReturns if the connection is valid. If the connection is invalid, returns and the errMsg parameter specifies the error message.
Remarks
This method is obsolete and has been replaced by the
IsValidConnection(bool, bool, AFPort, AFPort, out string)
method.
Version Information
AFSDK
Obsolete (compiler warning) in 3.1.1Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9
Obsolete (compiler warning) in 2.8.5
Obsolete (compiler warning) in 2.8
Obsolete (compiler warning) in 2.7.5
Obsolete (compiler warning) in 2.7
Obsolete (compiler warning) in 2.6
Obsolete (compiler warning) in 2.5
Obsolete (compiler warning) in 2.4