Vector feature selection is carried out within the Attribute Table dialog, which can only be displayed if the vector layer has been displayed on an open map. This tool will open a vector layer for display, if it is not already opened, and will automatically display the Feature Selection dialog. Feature selection is carried out using Groovy scripting. For details on how this is conducted, please see the tutorial How to select vector features. To select features based on spatial relations instead of attributes, use the Isolate vector features by location tool.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
inputFile = wd + "Countries.shp"
args = [inputFile]
pluginHost.runPlugin("FeatureSelection", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "Countries.shp"
String[] args = [inputFile]
pluginHost.runPlugin("FeatureSelection", args, false)