diff --git a/gplugins/klayout/netlist_spice_reader.py b/gplugins/klayout/netlist_spice_reader.py index 41620647..79a6a84b 100644 --- a/gplugins/klayout/netlist_spice_reader.py +++ b/gplugins/klayout/netlist_spice_reader.py @@ -54,7 +54,9 @@ def wants_subcircuit(self, name: str): @override def parse_element(self, s: str, element: str) -> kdb.ParseElementData: # Allow Calibre-style model name given as `$[model_name]` by removing the brackets - s = re.sub(r"\$\[([^\]]+)\]", r"\1", s) + # This is used for resistors and capacitors + if element != "X": + s = re.sub(r"\$\[([^\]]+)\]", r"\1", s) x_value, y_value = None, None if "$" in s: