how to iterate through parameters?

I keep running into wanting to set values of a constant chop from python, but I need to find the value* parm according to what the name* parm is…

apparently I can’t iterate through op(‘mychop’).par in python to access each parm and find which name# is set to the channel name I’m looking for.

I don’t want to do

if ( o.par.name0 == mychan_name):
o.par.value0 = myval
elif ( o.par.name1 == mychan_name):
o.par.value1 = myval

etc.

I must be missing some obvious way to find a parameter according to its content…
help?
thanks!
dani

op.pars() will give you a list of parameters you can iterate though. You can accept a search pattern to narrow down the list

You can find some examples of what malcolm is describing here:

matthewragan.com/2016/07/11/pyt … hdesigner/

and here:
matthewragan.com/2016/07/06/pyt … hdesigner/

If you search for pars() you’ll find the examples towards the end of these posts.

awesome - I was indeed missing something obvious!

thanks!!
dani