I am having a similiar issue. The views are being renamed in dynamo, but not on the file I am trying to modify?
Because you aren’t ever setting the name - just creating a string value for what you want the name to be. You need to add an Element.SetParameterByName as per post #8 in this thread. Please start a new thread as this post is rather old and rather long, and your issue is a bit different than this.
Which Package does this live in. I would love to use it!
Which package is what in?