If you're dealing with subcircuits, it's fairly easy to do it. Suppose that the symbol is Test.asy
and Test.sub
the subcircuit (or .lib
, .cir
, .txt
, whatever extension you want, it doesn't matter). The instance name is Test
. All you have to do is make a dummy subcircuit named Off
(for example) which is a blank subcircuit but with the same number of pins (for compatibility with the symbol). If your subcircuit has 3 pins, it would look something like this:
.subckt Off pin1 pin2 pin3
.ends Off
If your subcircuit comes as a load to a current source, or your surrounding elements cannot live without some conducting path, simply add some dummy resistors of appropiate values in there. Then, all there is to do is to rename Test
to Off
and either comment out the .inc Test,sub
or .lib Test.sub
statement, if that's what you have, or comment out the whole SPICE .subckt
block of text, if that's what you used. This way, you can keep the symbol in the schematic and also keep any parameters you have passed to it, without the need to change/add them again if you were to delete your symbol and then re-add it. The already mentioned methods would also work, but they will keep your node/element count intact (or worse), which means the matrix solver will be burdened, uselessly, even if your subcircuit would hardly ever be used.
If you have hierarchical schematics, I suppose this could be done, too, though I haven't tried this. One way is to make copies. Suppose your file is Test.asc
, then only a Test.asy
is the symbol linking to the schematic, so you could:
copy/move Test.asc
with a new name, Test.asc.orig
create empty Test.asc
with only some resistors of high values in it (1G
or so)
This will require modifying the files, themselves, so after the test, it would imply renaming Test.asc
to Test.asc.off
, then Test.asc.orig
back to Test.asc
, which is a bit tedious, but it can also be done easily with a minor script.