getLayerById

pyslm.geometry.getLayerById(layers, layerId)

Convenience function that locates the Layer within a list given a provided layer id by searching across Layer.layerId

Parameters:
  • layers (List[Layer]) – The list of layers to search

  • layerId (int) – The layer id to find

Return type:

Layer

Returns:

If found the Layer or None