Dublicate views when rename it

Greetings!
I’m very sorry for simple questions in the beginning but i’m trying to figure out how everything is going.
I’m trying to create script to rename the the existing views and all other sheets in the future with input.
But during the process i have same problem what i can not solve. In the beginning the views do not rename, it dublicate it and then gives correct names. How i should change the beginning to modify existing views, not double it?

  1. Create your view list.
  2. Get the list of existing views.
  3. Calculate the number of new views needed and create them.
  4. Combine the new and existing views and rename.
2 Likes

Friendly reminder to read what a Node does.
The FloorPlanView.ByLevel creates Views by Level. Thats why you get duplciates.
But as you want to rename the Views you need other Nodes.

1 Like