load_layout

photonforge.load_layout(filename, technology=None, layers=[], cell_names=[], library_properties=False)

Load a layout file as components.

Parameters:
  • filename (str) – GDSII/OASIS file name to load.

  • technology (Technology | None) – Technology used to create the layout. If not specified, the current default technology will be used.

  • layers (Iterable[tuple[int, int] | str]) – If not empty, only these layers will be converted.

  • cell_names (Iterable[str]) – If not empty, only these cells (and dependencies) will be converted.

  • library_properties (bool) – If True, this function also returns any library properties the layout might have.

Returns:

Dictionary of components indexed by name. If library_properties == True, also returns those properties.

Return type:

dict[str, Component] | tuple[dict[str, Component], Properties]