Change a Pipe Tag With a String Value to New Tag

I have a several pipe tags that I have modified. I want to replace the existing tags in the project with my new tags. I need to keep the old tags in the project. I added “Cen” in front of the old names but can’t get dynamo to accept the new parameter name and change out the old with the new. “parameter storage type is not a string”. I need to change the string parameters to an ElementIDs.
All help is muchly appreciated.

Anyone?

The error gives you a pretty big clue. “The parameter storage type is not a string.” You’re feeding a string (the type name) but you need to feed the FamilyType element.

Thank you Nick,
I see how to change a
String to a number
But how to change to an ElementID

You don’t need the ElementId. You need the actual Element. You can use the FamilyTypes dropdown node and select the Type there.

Yes, It works when I use the pull down and select a specific family. What I need, as shown in the diagram is to replace a specific family with a different one (Exact same name with a prefix added) in the same location.
Thank you for your input. Any ideas here?

My current solution is to make a “one to one” conversion for every family available. Just not a pretty solution but it works.

You would have to filter your existing tags first. Use Filter.ByBoolMask to filter the elements with the “Pipe Size Tag” type and the set the new type using the dropdown.

Making an option for each type looks like this:

Which, in this case, for all the options needed, looks like this

A cleaner solution would simply to add a prefix to an existing family name.

I see. I didn’t realize you had multiple tag types to deal with.

You can create the new name from the original and “lookup” that FamilyType from the new name.


(Mine only gives a warning because I don’t have any tags with those names.)

Thank you,
You have me on the right track. I get
“Please run this command in a family document.”
Also, I think using Element.FamilyName is the ticket also as it is the Family Name that I am adding the prefix.

You may have something else going on. It works correctly for me. Close your graph and try again. If that still doesn’t work post a screenshot of the full graph (with previews).

Replace Pipe Tag Family.dyn (7.2 KB)

I’ll post an example RVT file in a moment

Here is an example of families switching.

Cen Pipe Size Tag HydraCAD 1.rfa (292 KB) Pipe Size Tag HydraCAD 1.rfa (276 KB)

All Revit project attempts were too big to upload

Just make a pipe and put the tag on it.

It looks like you’re using the Orchid node with the same name. You need to use the out of the box node.

Edit: It also looks like you only renamed the family and not the family types, which means you’ll need to get the family with the new name but the family type with the same name as the original.