Rename Drafting Views by adding prefix number sequence

Hello Everyone,

Can someone help me with this definition I’m a little stuck.
I’m trying to rename a multiple drafting views listed under a specific view sort ie. “Sample” (see image 1).
Also the drafting views should have a series of numbers in front of their names numbered sequentially .001, .002, .003 etc. (see image 2).

Image 3 shows the extent of the definition so far.
Thanks for any assistance!!

Image 1
Image%201

Image 2
Image%202

Image 3

Rename Drafint Views Test.dyn (25.1 KB)

Like this?

CVestesen,

First off, thanks for the prompt reply, I didn’t expect it so soon, much appreciated.

This is great I’m on the right track I modified the text to more closely resemble what I’m looking for, i’m almost there see the image.

I have a couple questions on the image and then the biggest question is how to then the views in Revit to reflect my results?

Thoughts?

Rename Drafting Views Test_REV.dyn (24.3 KB)

If we start from left.
Codeblock with 1…20…1, 3 and “0”, means:
1 is the start in the index, 20 is the length and 1 is seq. If it was 2 the result would have been 2, 4, 6.

The codeblock with a+b+c simply just add the strings together.
That means you can use List.Split between two given characters, insert your text between and then join them again with a codeblock including a + b. Makes sense? :slight_smile:

Ok, got it!!
I revised the definition and it now names the views as I would like. see image.
The final step is to send it back to Revit to change the drafting view names.
I think a “Element.SetParameterByName” may get me there but any suggestions?

Thanks again.

That would be a good choice.
The Elements are from the FilterBoolMask, parametername is just a string with the given name and value is, of course, the new view name you have managed to create :slight_smile:

CVestessen,

How are you?

I was in the process of using the definition so that I can post an update then this happened.
I just this second did an update of version 2.0.1.5065 but, I’m not sure this is the cause.
Everything seems to work except the “ElementGetParameterValueByName” node.

The trouble is this worked up to now and i can’t seem to see the cause, can you please take a look?

Rename Drafting View Details.dyn (28.3 KB)