diff --git a/klayout_dot_config/python/SiEPIC/extend.py b/klayout_dot_config/python/SiEPIC/extend.py index 55ea1206..6907dc03 100644 --- a/klayout_dot_config/python/SiEPIC/extend.py +++ b/klayout_dot_config/python/SiEPIC/extend.py @@ -1334,7 +1334,10 @@ def get_LumericalINTERCONNECT_analyzers_from_opt_in(self, components, verbose=No from SiEPIC.utils import load_DFT from .utils import get_technology_by_name - TECHNOLOGY = get_technology_by_name(self.layout().technology().name) + if 'TECHNOLOGY' in dir(self.layout()): + TECHNOLOGY = self.layout().TECHNOLOGY + else: + TECHNOLOGY = get_technology_by_name(self.layout().technology().name) DFT = load_DFT(TECHNOLOGY) if not DFT: if verbose: @@ -1783,6 +1786,8 @@ def plot(self, width = 800, show_labels = True, show_ruler = True, retina = True # Load layer properties from the technology lyp_path=layout.technology().eff_layer_properties_file() + if not lyp_path: + raise Exception ('SiEPIC.extend.plot: technology not specified.') layout_view.load_layer_props(lyp_path) # Configure the layout view settings diff --git a/klayout_dot_config/python/SiEPIC/scripts.py b/klayout_dot_config/python/SiEPIC/scripts.py index b2f718d2..7049c93d 100644 --- a/klayout_dot_config/python/SiEPIC/scripts.py +++ b/klayout_dot_config/python/SiEPIC/scripts.py @@ -2527,15 +2527,15 @@ def open_folder(folder): print("running in windows explorer, %s" % folder) print(subprocess.Popen(r'explorer /select,"%s"' % folder)) -''' -User to select opt_in labels, either: - - Text object selection in the layout - - GUI with drop-down menu from all labels in the layout - - argument to the function, opt_in_selection_text, array of opt_in labels (strings) -''' def user_select_opt_in(cell=None, verbose=None, option_all=True, opt_in_selection_text=[]): + ''' + User to select opt_in labels, either: + - Text object selection in the layout + - GUI with drop-down menu from all labels in the layout + - argument to the function, opt_in_selection_text, array of opt_in labels (strings) + ''' from .utils import find_automated_measurement_labels text_out, opt_in = find_automated_measurement_labels(topcell=cell) if not opt_in: diff --git a/klayout_dot_config/python/SiEPIC/utils/__init__.py b/klayout_dot_config/python/SiEPIC/utils/__init__.py index 22ba12c1..9f970643 100644 --- a/klayout_dot_config/python/SiEPIC/utils/__init__.py +++ b/klayout_dot_config/python/SiEPIC/utils/__init__.py @@ -242,7 +242,7 @@ def get_technology_by_name(tech_name, verbose=False): if not tech_name: raise Exception( - "Problem with Technology", "Problem with active Technology: please activate a technology (not Default)", pya.MessageBox.Ok) + "Problem with Technology", "Problem with active Technology: please activate a technology (not Default)") from .._globals import KLAYOUT_VERSION technology = {} @@ -1209,8 +1209,11 @@ def find_automated_measurement_labels(topcell=None, LayerTextN=None, TECHNOLOGY= import string if TECHNOLOGY == None: if topcell: - from . import get_technology_by_name - TECHNOLOGY = get_technology_by_name(topcell.layout().technology().name) + if 'TECHNOLOGY' in dir(topcell.layout()): + TECHNOLOGY = topcell.layout().TECHNOLOGY + else: + from . import get_technology_by_name + TECHNOLOGY = get_technology_by_name(topcell.layout().technology().name) else: from . import get_technology TECHNOLOGY = get_technology()