PySpice icon indicating copy to clipboard operation
PySpice copied to clipboard

Include from inside SubCircuitFactory

Open mbacvanski opened this issue 1 year ago • 2 comments

I have a few nested subcircuits, which I'm building with SubCircuitFactory. It seems that when I use a component in an inner subcircuit, it needs to be included in its immediately containing subcircuit, which means I need to be able to have an .include statement from SubCircuitFactory. However, it seems like I can only add .include statements from Circuits. How can I get around this?

As an example, this is what I need

.subckt A input output
.include opamp.sub
.subckt B input output
* inside here I use the opamp
.ends B
.ends A
.end

but there is no self.include(...) method from SubCircuitFactory, so it seems like I can only do this, which doesn't work:

.include opamp.sub
.subckt A input output
.subckt B input output
* inside here I use the opamp
.ends B
.ends A
.end

mbacvanski avatar Dec 04 '24 23:12 mbacvanski

ahh yes I think I have a very similar problem

Kreijstal avatar Feb 02 '25 20:02 Kreijstal

@mbacvanski This is fixed now if you are still intersted.

tapegoji avatar Apr 18 '25 20:04 tapegoji