Replace Tag Text by condition

Hi!
I have read through many of the discussions on and tried many of them too but it still doesn’t seem to work for me. I am very new to Dynamo, but was trying to figure out how to do this for our file.

I am trying to replace the pipes tag text from “_” into “-” according to an Excel file that I have prepared.
I’m not sure I’m in the right way…

Please help.

Thank you all.

Tags in Revit are getting their values from something called a Parameter. The value displayed by the Tag is actually stored in the Element that the Tag is tagging. To override the value displayed by Tag one must override the Element being tagged, and to be more specific its parameter.

1 Like

Hey Konrad, so say in the case of a material tag reading the identity or the description value in that material how would one go about getting the value of those tags in dynamo? Since its not a parameter of the wall itself but rather one in the material…any ideas?

@carlosguzman I don’t think Material Tag’s text is exposed to the API (screenshot from Revit Look Up in Revit 2018.1)

The workarounds that I can think of have a lot of room for error i.e. if collected material tags are being used to tag paints to identify finishes in elevations, one could get Tagged Element from tag > Get Paint Materials from Element > get description parameter from Material (the association between the tag and the material description wouldn’t be “linked” per se, and has potential to fall apart if a wall has 2 paints and only one is tagged, etc.) Maybe Konrad or someone else might have more clever solutions.

Thats a good suggestion. The thing I’m working on has to do with orphaned tags and running a diagnostic script that figures out if there are any tags at all in the project and where they are located (what view, element, etc). I manage to get to extract all the info but when you do get text from tag and the input is a material tag I get empty lists of elements. I read in previous threads about an IsOrphaned property that one could work with in the api docs but haven’t exactly worked on it myself as its a little outside of my skills