Please see the discussion here: https://www.klayout.de/forum/discussion/2253/resolving-lib-control-statements-in-spice-netlists#latest A useful workaround is to use ngspice as a preprocessor.