GetSelectedNetName Method (View Object)

Scope: Schematic editor

Object: View Object

Prerequisites: None

Returns the name of the selected net(s).

Usage

View.GetSelectedNetName(ByVal bRetFullPath As Boolean, ByVal bRetInternalName As Boolean, [ByVal Index As Long = 1]) As String

Arguments

bRetFullPath

Specifies whether or not the full path of the net is returned: True - the hierarchical path to the net precedes the net name; False - only the net name is returned.

bRetInternalName

Specifies whether the internal net name is returned, or the user-assigned label: True - the internal net name is returned; False - the user-assigned label for the net is returned.

Index

(Optional). A number indicating one of the selected nets. The default value is 1.

Return Values

As String. A string containing the name of the selected net(s), or an empty string if no net is selected or if the index is out of range.

Examples

Find the names of multiple nets in the selected list.

Index = 1 
For Each Net In ActiveView.Query(VDM_NET, VD_SELECTED) 
    MsgBox ActiveView.GetSelectedNetName(FALSE, FALSE, Index) 
    Index = Index + 1 
Next