Lookup a Layer

Lookup a Layer
 1# This script shows how to use LookupProjectAndLayerKeysFromValue to find ONE_UP layers having a BOARDGRD that contains the string "Sim"
 2
 3ot = impact.gui.output_toolbox
 4ot.clear()
 5
 6opts = impact.creator.lookup_project_and_layer_keys_from_value_params()
 7
 8opts.column_name = "BOARDGRD"
 9opts.table_name = "ONE_UP"
10opts.value = "Sim"
11opts.search_type = ipStringSearchType.sstContains
12
13impact.active_database.lookup_project_and_layer_keys_from_value(opts)
14
15for key in opts.layer_keys:
16    ot.add(key)
17
18for val in opts.matching_values:
19    ot.add(val)