Query Method (Application Object)

Scope: Schematic editor

Object: Application Object

Prerequisites: None

Returns a collection of objects based on type.

Usage

Application.Query(ByVal Flags As VdObjectTypeMask, ByVal Selected As VdAllOrSelected) As IVdObjs

Arguments

Flags

Masks which may be combined to filter the objects selected by this method. This argument is of type VdObjectTypeMask Enum.

Selected

Determines whether to consider all objects or just selected objects. This argument is of type VdAllOrSelected Enum.

Return Values

As IVdObjs. This is a collection of objects that have been filtered by the Flags argument.

Description

The Query method is very valuable for locating and examining all objects of a particular type. You can perform the query on all objects or on a (filtered) set of objects.

Examples

Find all the selected components in all sheets in memory.

For Each Comp In App.Query(VDM_COMP, VD_SELECTED) 
	MsgBox "Component UID=" & Comp.UID 
Next