Renaming Revit Views


I am trying to rename revit view “View Name” from one value to another. Please see methodology below.

  • Select all view types
  • Filter by View Name
  • Search for views beginning with “M”
  • Filter with BoolMask and Clean to get all true values
  • SetParameterByName to change “M” values to “E”.

I am very new to Dynamo and trying to learn but everything seems to be going wrong. Any advice or similar scripts would be very helpful :slight_smile:

Error msg: Warning: Internal error, please report: Dereferencing a non-pointer. (3f47aacd)

1 Like

Currently your feeding boolean to elements you need to feed elements to it.

@Kulkul Ah I have resolved this and now the views are showing up. However, still not working. Is it because the String “E” into SetParameterByName is trying to change all the views to “E” instead of replacing “M” with “E”? If so, is there a node to replace values? Thanks for the quick reply!

Hi Lynton,

Do this changes on your graph.

1 Like

Thanks Kulkul!, the script is working now. However this will try and rename all filtered views to “E”, is it possible in dynamo to replace letters in the view name so that the first “M” becomes an “E”, or is it better to export to excel and do it like this?

You don’t need to export view name to excel, you can do this in Dynamo it self.

Ok, would I be able to use String.Replace for this?

Get the parameter “View Name” values from views then use string.Replace node to replace your values that contains “M” in your case with “E”

1 Like

I have added this and is still saying “the name entered is already in use”