Automate replacing tags

Hi all,

I am new to Dynamo (and Revit) and I have some problems with the script I am trying to make.

Versions:
Dynamo 1.3.3.4111
Revit 2017 x64

The situation:
We have old tags in a revit 2017 model.
The old tags are without naming so everytime I tag I need to manually do a different tag for the name.
This is using up a lot of time so we created a new tag with integrated naming.
The only problem is I need to redo all the tags… because find and replace only works on text.
(I am not allowed to change/edit the family and be done with it)
Now am I trying to make a script in Dynamo which will automatically replace all the old tags with the new tags.
The script I am trying to make will search a view for the old tag and automatically replace them with a new one.

My understanding of Dynamo is limited because I have not worked with Dynamo before.
In my head I think I have the commands for it but I dont know how to write it down in Dynamo.
Beacause I dont know what the description of most of the commands are in Dynamo.

So basically what I want to do is this:
Select a view >
See old tags >
Select old tags >
Replace old tags with new tags >
Done?

Here is an overview of what I have, aka which module I think I need:

Similair questions found:
I found some questions which look the same but I dont really understand them.

Thanks for reading and I hope you can help me.

Here is an example of the old and the new tag.
New users can only post 1 image per post…

1 Like

Couldn’t you right-click the old tag, Select All Instances in Entire Project, and change the type to the new tag?

Yes, but I want it for specific views.

So you’re not changing all the old tags, only those in specific views…

I would start with a node that gets all elements of a category in a specified view (MEPover and Archilab both have one.) Get all the tags in your view and their type. Check this list against your Old Tag type and filter those elements with Filter.ByBoolMask. Now use Element.SetParameterByName to change the type to the New Tag.

2 Likes

Hey Nick,

Thanks for all the help.
I figured it out.
I now got a working script to change tags level by level.
Its not fully stable but it works.
For those who are interested in the script:
Auto replace tags by level.dyn (33.1 KB)
These are the packages I have installed I used some of them.


(I dont know how to make an overview of which packages I used in this script.)
Thanks for your help.

What package is Tag Get Location?

MEPover

1 Like

Thanks… and thanks for sharing the code

No problem, happy to help the community.