query_layout_obj_instances#

LayoutInstance.query_layout_obj_instances(layer_filter=None, net_filter=None, spatial_filter=None)#

Query layout object instances using the provided filters.

Parameters:
layer_filterlist[Layer or str or None], default: None

Layers to query. The default is None, in which case all layers are queried.

net_filterlist[Net or str or None], default: None

Nets to query. The default is None, in which case all nets are queried.

spatial_filterPolygonData or
PointData or None, default: None

Area of the design to query. The default is None, in which case the entire spatial domain of the design is queried.

Returns:
list[LayoutObjInstance] or tuple[list[LayoutObjInstance], list[LayoutObjInstance]]

If a polygonal spatial filter is specified, a tuple of lists of hits is returned in this format: [<hits_completely_enclosed_in_polygon_region>, <hits_partially_enclosed_in_polygon_region>]. Otherwise, a list containing all hits is returned.