Automating family creation (renaming parameters, changing tag labels)

Dear Dynamo experts,

I am attempting to create much more versatile tag families that allow the end user to selectively show/hide tagged parameters and do a few changes to the font styles with dropdown menus for each category. Much of this I will need to find a way to automate using Dynamo due to the sheer amount of visibility variables, see explanation below. Unfortunately, I cannot seem to figure out how to use Dynamo in the family creation environment. What I really want to know, is it possible to mass-rename parameters and alter text labels in Dynamo? I currently have vanilla Dynamo installed, no packages or addons.

In the screenshot below, the user primarily uses the “Area“ variable as a dropdown menu for font styles (including the choice of “-“ which hides the Area label completely) which is actually a dummy nested family that does nothing. A list of valid styles is defined as instance variables so whenever the dummy nested family is equal to an instance variable, some other visibility variables are activated, showing the relevant text in that certain style. Fortunately, there’s a gimmick with Tag parameters, where instance-based variables are completely hidden from the user, so I could use them to do the “dirty work“.

In total there are 3 different font sizes and 4 different font styles (normal, bolt, italic, underlined) per font size plus 3 different alignments (left, centered, right), which gives us 36 different labels that are selectively shown, based on user setting. So far, I’ve got it fully working for the “Area“ parameter of the room and I would like to do the same for all the other room variable types. Due to the sheer amount of variables (at least 50 for each shown category), I would have to resort to Dynamo to be able to manage this task.

This is what I have in mind:

  1. Save copies of this room tag .rfa, one for each type of paramater that should be displayed.
  2. For each .rfa, replace the “Area“ label with something else
  3. Rename the parameters.
  4. At the very end, copy all the contents from all families into the tag family. The resulting family will likely have 500+ instance-based parameters that are all hidden and the user sees perhaps 50 parameters (99% repetitive), so it should be easy and versatile to use.

I’m attaching the .rfa as-is so you get the idea what I want to achieve. Any help on this would be greatly appreciated!

Littera Rum Arial.rfa (468 KB)

As it turns out, I found a better way by using the add-on DiRootsOne. Even the free version has the capability of importing/exporting parameters to Excel format, which is an even more efficient method to Dynamo when mass renaming parameters. My room tag family now has 743 parameters, most of them visibility parameters, to account for the different font/style combinations!

I am still forced to manually change tag labels manually, which slows down the process. Is it possible to edit these tag label objects in Dynamo?

743! :scream: :face_with_peeking_eye:
Does that mean you have many, many types for that Tag?

Couldn’t you break up the Tag in multiple Tags each Tag having the fonts / style you need for the specific drawing (View)?

My experience is trying to fit everything in just one Family isn’t always
the best way to go about it.

Just my two cents.

Those visibility variables, while technically instance-based, essentially function as type-based variables since their yes/no value is driven by user-defined type based variables (see screenshot below). The sole reason they’re not type-based is to make use of the Revit gimmick of instance-based variables not being shown at all for annotation tags.

The resulting label family, despite having so many variables, is only twice as large as a brand-new room tag family created from a template. It’s quite versatile, so the user need not create a brand new family for some custom label combination but rather use the drop down menu to determine visibility/font. In Swedish “Högerjusterad“ means “Right-aligned“ and “Vänsterjusterad“ means “Left-aligned“ (centering can be achieved by enabling or disabling both). Offset x and y variables indicate the relative position of the label text in relation to the insertion point (0,0,0) of the tag family and they can be negative.

The only downside is that it takes half a day to create a tag family due to the sheer amount of label objects for each font/style combo for each labelled parameter. Is there a way to speed up the process with Dynamo?