AFPort.ToString Method (AFModel)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Formats the port name relative to the specified model.
Namespace: OSIsoft.AF.Modeling
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public string ToString( AFModel relativeTo )
Public Function ToString ( relativeTo As AFModel ) As String Dim instance As AFPort Dim relativeTo As AFModel Dim returnValue As String returnValue = instance.ToString(relativeTo)
public: String^ ToString( AFModel^ relativeTo )
member ToString : relativeTo : AFModel -> string
Parameters
- relativeTo
- Type: OSIsoft.AF.ModelingAFModel
The Model containing the port
Return Value
Type: StringReturns a String that represents the current object.
Remarks
If a relative path from the element to the model is not found, then just the element name
is used. If a port from an element template is used, then just the name of the element
template is returned.