SelectPath Method (Application Object)

Scope: Schematic editor

Object: Application Object

Prerequisites: None

Opens a schematic and selects objects based on a path from the top of the design.

Usage

Application.SelectPath(ByVal FileName As String, ByVal HierPath As String, ByVal SheetNumber As String, ByVal Type As Long, ByVal AddSelected As Boolean, ByVal SearchBus As Boolean) As Boolean

Arguments

FileName

Name of the document that is the top of the design. This argument is a string with a specific format, resembling a path specification:

[library_name:]name.sheetnumber

library_name is the (optional) alias assigned to the library containing this object. You need not specify the library_name when opening the top level sheet of the schematic. name.sheetnumber is the name and sheet number of the schematic. For example:

dxApp.SelectPath "Schematic1", "\$1I9", "", 0, True, False 

These paths are often included in error and warning messages. Only the target document is opened, not all the documents along the path.

Note:

In C++ , you must escape the \ character as \\.

HierPath

Hierarchical path specification. Defines the path from the top-level document specified by FileName to the target item. It has the format of:

instance_name\instance_name\...\instance_name

For example, $1I2\$1I1\$1I1 or the C++ string would be "$1I2\\$1I1\\$1I1"

SheetNumber

Contains either the actual sheet number of interest or, in most cases, “” which indicates that the application open the default sheet.

Type

Specifies which type of object to select. This value is ignored if the HierPath argument is specified using the internal unique identifiers (as shown above). If the path is defined using labels, then the Type value must be one of the following:

  • 0 - selects a component.

  • 1 - selects a net.

AddSelected

Specifies how to handle previously selected objects: True - add to currently selected objects. False - replace current selection.

SearchBus

This value is ignored unless no matching net labels are found.

True - Look for label in expanded bus labels. False - Only look for the label on nets.

Return Values

As Boolean. True - the path was found and at least one object was selected. False - The application could not fine a path or an object.