Rename all views


I’m trying to create a Dynamo script that finds all views that contain a certain string and replace that string with something else. Everything works perfect untill the moment I connect it to element.setparameterbyname.

What am I doing wrong?


Try lacing > longest, not crossproduct

What is the warning you are getting

I don’t know what lacing is, but will try to figure it out.

The boolean is not filtering the right thing.
After list.Clean you have Views and then you filter that list again using the 5001 string. This most likely gives you a shortest list.
Use the boolean mask on the List.clean

Like this?..thats not working

You still need to get the View Name first. Then you check if it contains 5001 and the boolean result is what you use to filter the sheets

Could you show all the previews from your nodes, it is hard to help you when we cannot see the data or the errors?

Sorry I cant find a working option in the menu that shows a preview. "Show run preview"is an option that does absolutely nothing :face_with_raised_eyebrow:

Hover over your nodes and click the pin to show the data, likewise hover over your error and take a screenshot when the error is displayed…

The preview you’re talking about is the preview of geometry inside the Dynamo background (and the Revit preview in fact) but not of your data…

I’m aware of the option, though I thought you ment that there’s an option to show all warnings at once.


Thank you very much.:handshake: This works …it looks like you can’t replace a string out of a filterbyboolmask list

No the mask is only yes/no and the filter to decide whether you want to continue with the yes or no. After you can do what you want :slight_smile:

I’m trying to do the exact same thing with sheets, but get an error.

That is because you’re passing element values and not elements :slight_smile:

Sorry that I don’t understand what you’re saying…I’m still pretty much a beginner at this.

See this:

I would really encourage you to read the Dynamo Primer, as a lot of this stuff is covered in there for getting started with Dynamo not just jumping in from the 5th floor :wink:

What you are doing is finding a “Element” using the Element Types node, these elements are basically containing all information regarding the element.

Using the “GetParameter…” node you are getting a single information from the element, this parameter does not contain any other information than itself.

The filterbyboolmask works by taking all “true” masks and outputting the corresponding list items in “in” and all “false” masks and output the corresponding list items as “out”.

By using the parameter “Sheet Number” for creating your mask you need to actually filter your elements and not your parameters. Thus the red line connecting your “list” of elements filtered by your “mask” of parameters.

1 Like

I’ll do that :open_book::face_with_monocle:

and thanks for your help…that did the trick. I will dive into the primer now.