All elements of Family Type returns Empty List when looking for Tags

Hello All,

I am attempting to create a Dynamo program that changes parameters within Electrical Fixtures as well as parameters within their respective tags. All is working fine except the tags. It seems to me that Dynamo/Revit treats tags diffently than other family elements such as Electrical Fixtures. When I try and use “Family Types–>All Elements of Family Types” with my tag family selected, Dynamo returns an “Empty List”. Can anyone shed some light on how to access and set parameters within tags? I’ve attached the Electrical Fixture Family, the Tag Family, and the Dynamo Script.

Duplex Receptacle.rfa (364 KB)
Electrical Fixture Tag getData (Second Attempt.dyn (21.2 KB)
SWE - Electrical Fixture Tag.rfa (256 KB)

You want All Elements of Category with the Categories selection.

Thanks for your response. This works for identifying all the instances of that category, however when setting the parameter, I get the error that the parameter I am trying to set is unavailable. It seems that only category parameters are available. Hopefully I am just overlooking something.

Are you trying to set an instance parameter or a type parameter? I had to use Rhythm’s Element.SetParameterByNameTypeOrInstance to get it to work with a type parameter.

I have been introduced to Rhythm’s Elements.SetParameterByNameInstanceOrType and tried to use it as well. It gave me the same result. Currently the parameter I am trying to set is an instance parameter. The problem happens before it ever reaches the SetParameter Block however. All Elements of Family type does not see any tags though the tag family is discovered with the “Family Type” block as well as the “Categories” + “All Elements of Categories” Blocks.

Tags don’t quite work the same was as other elements. All Elements of Category was the only way I found that would get all instances. Let me look at your families and see if I can find another way.

I may have misunderstood your initial question. What parameter are you trying to set in the tag? As far as I’m aware, tags can’t have (additional) instance parameters. Check within your project. Can you manually do what you’re trying to do in Revit?

I believe you are right. Tags cannot have parameters within them that are externally controlled, recalled, or reported. I was able to create parameters within the tag family, however, using them from the properties window within the revit project does not work like normal families.

My new approach is to use multiple types for the tag families to accomplish the desired visibility settings. This is how I was originally doing this. I was trying to make a more automated way of choosing which label was visible based on parameter settings withing the electrical fixtures themselves.

My next task is to use dynamo to chose the correct tag family Type. I believe this will be the best option.

1 Like