Closed PiyushSaini07 closed 1 year ago
You can store the attribute names and values for each attribute in a list and assign the attributes in a loop, yes.
attributes = [
('t2', '10n'),
('v2', 1),
('t3', '100n'),
('v3', 4),
]
for name, value in attributes:
setattr(voltSupply, name, value)
This is nothing skillbridge specific however, just normal python.
It works like a charm, Thanks for the help!
I'm slightly new to python so had no clue this can be done.
Hi,
I was wondering whether I can update a vpwl source from skillbridge automatically using a loop.
I have a code that manually updates the time value pairs of the source:
Is there a way to initialize these time value pairs inside a loop? Or if I can pass them from a list (for example:
[("0n",0),("10n",1),("100n",4)]
).I looked for vpwlf source, but that requires a file input and I want to avoid an extra file.