Closed georgtree closed 2 months ago
it is possible, to render a generator, you must call its name with parenthesis, perhaps with arguments. Since in a preview window you are not usually giving any parameters the generator script should be usually architected to accept no arguments and do a "default" action.
To preview a generator tier.tcl
:
xschem preview_window draw .p {xschem-repo/trunk/xschem_library/generators/tier.tcl()}
The tier.tcl is a generator that display either a VDD tier symbol or a GND tier symbol depending on the node name given as parameter, like tier.tcl(VDD) or tier.tcl(GND). when no arguments are given it displays as a GND symbol.
Great, thank you, I have many components that use scripts not for changing the symbol but it's properties in device_model attribute. I will try it today's evening.
All works, thank you! Additional question - is it possible to show hidden by default text in preview window? Thank you in advance!
I think you can temporarily enable the global variable show_hidden_texts:
set save $show_hidden_texts
set show_hidden_texts 1
xschem preview_window draw .path /path/to/symbol.sym
set show_hidden_texts $save
Ah, right, thank you!
Hello! Question - is it possible to preview generator symbol with command
preview_window
with default input for generator? It should be possible somehow, but I need your advice, thank you.