Hello everyone
Has anyone managed to make this work? The way I’m reading the help it’s about having the possibility to use a “template” symbol which can call other symbols (or subcircuits, like LTspice) by using a multiple choice attribute, and have the symbol change shape, parameters, etc (similar to Simulink?). See Help > QSPICE > Schematic Capture > Symbol Editor > Programmable Attributes, 5th entry, in particular 2nd note). What I did:
- new C block, y=a*b
- make symbol for it, name it “mult”, save it in
./mult/mult.qsym(with source and .dll) - new C block, y=a+b
- symbol, name it “add”, save it in
./add/add.qsym(source+.dll) - in sym. ed. delete everything, create (e.g.) basic circle, no pins, make symbol type Φ, add 1st attribute
lookup<1,2;mult,add>, 2ndtype=<1,2>(w/o parenthesis), save as./math.qsym - mkdir
[QSPICE]/Repository(symlink seems to work, too), movemath/*inside - new schematic, look for “math” symbol and place it in the schematic
I can select any type, 1 or 2, from the drop-down menu but, nothing happens – and QSPICE adds a red “!” when I hover the mouse over it. If I add some sort of name before lookup (e.g. name lookup<>), there is no more red “!” but, still, it doesn’t work. If I change lookup<2;mult,add> so that 2 references the 2nd attribute, nothing. Change type=<mult,add>, nothing. Restart QSPICE, nothing. How is it supposed to work? This has a lot of potential.
Oh and, don’t know if you noticed it, char* parameters are not case sensitive (FoObAr reads foobar). Just a heads-up.
