Add parameter to all elements of category from schedule

Is it possible to create a dynamo script that will add schedule parameters (fields) to all elements of a category in batches? Right now, I have a lot of schedules where I want to add all parameters to elements of certain categories, but doing it manually will take days. I’d like to create a script to automate the process if possible.

Schedules are like windows on a filtered collection of Revit elements. If you want to add a field to a schedule - add a shared or project parameter to the category of the elements that you want to schedule.

If you need to populate the schedule - collect all relevant the elements in Dynamo and update the parameter.

Quick and dirty alternative - group the schedule as needed (e.g. do not itemize every instance) and update the required parameter schedule cell which will populate to all the elements of the group

That’s not quite what I was asking. I’ll explain in a bit more detail. I’ve created Revit project templates and a Revit family library for our company. The Revit template file has schedules for everything we would use on a project, Rooftop units, Diffusers, Radiant panels, etc. Our Revit family library has all of those things created. Both the families and the schedules use shared parameters to populate schedule data. The problem arises when we need to use a piece of equipment that was not created in house. This happens quite often with Rooftop units. Once we get later in the design process and nail down which manufacturer and model we are going to use, we get the actual Revit family for that piece of equipment from the manufacter. That family won’t have the same shared parameters as our schedule.

So, when we want to fill out the schedule data for that piece of equipment, we go to the schedule, and all cells are un-editable, because the families don’t have those shared parameters. What we have to do at this point is edit the fields for the schedule, select a parameter, click the edit pencil icon, then check the box that says “Add to elements in the selected categories”, which adds the shared parameter as a project parameter for all mechanical equipment. Then, we are able to enter schedule data for that column in the schedule. But some schedules have 30+ parameters, and there are always multiple schedules. It can take some time to do that for all parameters.

The intent is to create a Dynamo script that essentially does the following:

  • Finds schedules that are on sheets.
  • Gathers the shared parameters located in those schedules.
  • Goes through the process of editing the field, checking the Add to elements…. box, and adding those parameters to all elements of the category of the schedule.

I hope that makes more sense.

I might be wrong, but…

If you check this off in the template, and then load a family in, does it not push the parameters into the family? Said another way, instead of this process:

  1. Start with the template
  2. Load the families as design progresses
  3. Modify the parameters to push to all elements when you see things are missed
  4. Fill out the parameter values

Maybe try this:

  1. Modify the template to make all paramters push
  2. Start with the template
  3. Load families as design progresses
  4. Fill out parameter values

The first option has you repeated step 3 on EVERY project where you use a new family; the second process has you doing step 1 once per template.

I’ve considered doing that, because ultimately, it does do exactly what I’m trying to do. However, that results in having hundreds of parameters in the property palette when selecting a piece of equipment. Obviously, that’s not the end of the world, and it’s what I’ll probably do if I can’t find a way to create a Dynamo script to do what I want. There are a couple of people in the company that hate editing parameter values from within the schedule. They like selecting equipment on a plan view and editing values in the properties palette. I’d hate to make them sift through tons of parameters that don’t apply to the equipment they have selected.

At my previous company, we had a BIM manager that handled this stuff, and I don’t know how they did things. I also don’t know what the “industry standard” is. At my current company, when I was hired, I was the only one with extensive Revit knowledge, so I’ve kind of been pushed into the BIM manager role. So would it be more typical for companies to just add all parameters as project parameters to all equipment in a category? Use shared parameters as I have? Or do most companies use in-house equipment throughout the entire design process all the way through as-builts?

How?!? :exploding_head:

Are the Parameters also named really different?
If it was, for example, A_HEIGHT and B_HEIGHT then it would be ‘simple’ to map them (i think) .:man_shrugging:

Maybe if they have a Pset you
could leverage that (for mapping)?

Too many type parameters by the sounds of it… but yes, it’s a trade off.

You mean

too many parameters

:sweat_smile:

I meant ‘instance’ instead of type. But yeah the sentiment holds. :laughing:

Regardless.

In my personal opinion ‘hundreds’ is too much.
Even worse is when offices use their own
Parameters with different names.
Not sure if thats the case here though.

Branche standards (IDS?) matter. :upside_down_face:

Anyhow, back on topic. :innocent:

Project parameters are generally how most firms deal with this. Diroots paramamager is a great addin for this task.

The only alternative is to add the parameters in the actual families which can technically be done programatically but ultimately is much harder and likely overkill.

I have a chapter of examples here on family editing using my custom package here:

Note that currently ive left family loading out of my package as it isnt natively supported in dynamo until later builds due to cpython3 limitations.

I haven’t counted the parameters for an exact number, and hundreds plural might be an overestimate. Anyway, I don’t really see how it’s avoidable. I’m just a designer, not an engineer. We schedule a lot of things that I’m not 100% certain are necessary. For example, for rooftop units, we schedule the dry bulb and wet bulb entering/leaving air temperature. So between heating and cooling, there’s several parameters. Then for units with energy recovery we have CFM, HP, ESP, and RPM for all of the fans, SA, RA, EA as an example. So each of those need to be separate parameters. And we use a lot of different types of equipment because we work on projects in numerous industries. That being said, I have already identified some areas that could be optimized, and those changes are on my to-do list.

Anyway, based on what everybody has said, I think I’ll proceed with what Jacob.small said and add all of the shared parameters to all equipment in the template file. I’ll identify areas where I can limit the number of parameters.

Thank you all for your input.

I can relate. So often we get asked too add a bunch of Parameter because it is on their
(check) list, but when you ask the ‘why’ then most of the time we can leave out many Parameters.

I think that is the best approach too (for now).