Changing Family Parameter Parameter Group

I don’t know how you run that code at the moment but you could need to adapt it for using in Dynamo, see: