General question on Dynamo capabilities

Would it be possible to create a script that will automatically assign an electrical or plumbing symbol/family to an imported family that has electrical or plumbing parameters?

I work in foodservice and we use a third party catalog/plugin for equipment families. They’re all pretty decently set up and already include their respective electrical or plumbing type parameters.

What the process is currently, is after I’ve created my initial layout, I then have to go back through the entire layout and assign plumbing/electrical symbols to each piece of equipment, wherever they may be placed in whatever view.

What I’d like to do is automatically have those symbols assigned to them as soon as they’re imported IF they have that data assigned to them in their family parameters. Our MEP symbols are pre-loaded into our template so I have to imagine there is some way to accomplish this.

In short, I’d like to be able to automatically assign a pre-loaded family (MEP symbol) to an imported family (equipment), IF the equipment that is being imported has the associated type parameter populated.

Any insight would be extremely appreciated. Even just a “yeah you can do that” or “no you can’t” would be tremendously helpful.

Thanks!

I suggest nesting the symbols in families and constraining their visibility with a yes/no parameter. Since text parameters cannot be used as conditions in family parameter formulas, then you can use dynamo to detect whether other parameters are populated or not. If they are filled, set the visibility parameter to true, if not, set to false.

But this only makes sense if some conditions are inside the instance parameters. If all the conditions are type parameters, just nest the symbol, use the visibility parameter, open the project, open type by type in the project browser, and manually set the visibility for each type…

The third way (I would avoid) is to get the location of all target families in the dynamo and place another family on top of them. It is a 3D family that has a nested symbol. Take the data from the target families, set the conditions in the dynamo code block and use it to constrain the visibility of the symbols.

Yes, that is possible.

But by imported you mean it is placed / visible in your project already? Or else it will be more challenging.

Without any addition info it is hard to come
up with / help you with a workflow though.

1 Like

In general, it’s best to think of Dynamo as automated and not automatic. Dynamo runs on command (when you press a button) not on event triggers, so you (typically) can’t have Dynamo “automatically” do something.

Otherwise, it can do everything that’s available in the API. Changing family types (or placing new ones) is definitely on that list. You just have to work out the graph logic. In your specific case though, I agree that there may be better options. Copy/Monitor seems like the obvious choice if you have links. Otherwise, there are other issues you run into with switching types in a fully connected model.

1 Like

I appreciate the quick response! There are tens of thousands of families though and each manufacturer is technically responsible for their own. So it would require either me going in and nesting the symbols myself or getting them all on board with this. Neither are likely to happen anytime soon haha.

My thought process is, as long as there is a value in the electrical or plumbing parameter, I should be able to come up with some kind of script that can identify that upon import and assign the rough-in symbol automatically.

Now I just have to figure out how. Lol

Good addition. I assumed OP would run the
graph at some point (when he is able to make one).

1 Like

I understand. By imported I mean they are brought in one by one from a library plugin called KCL. Equipment varies project to project so it’s not the same stuff all the time.

Once I have all the equipment in there, the layout gets approved, then we’re responsible for doing the rough-in drawings related to the cooking equipment. The rough-in symbol families live inside of my model template.

So i assumed correctly they are placed somewhere in the project then (and not only brought in as a Family in the Project Browser).

But even when you have to place the Family first (after bringing it into your Project) it is possible to place a symbol / Family over those Families (so not nest them in the Family). More like placing a Tag.

You can definitely do that with Dynamo. Have Dynamo tag the element and then look at a specific parameter value and set the tag family and type according to what that value is.

1 Like

Understood. Makes total sense. All of this would be done in a central model with the only link being an architectural model for wall references.

With the automatic/automated distinction mind, it would still be helpful to have a command that could assign the symbol to the family all at once by clicking a button.

I wouldn’t need the command to modify any type parameters in any way. Rather just check to see if it has a value other than zero, then assign a symbol to the family based on what the value reads. 120.0V, 208.0V, etc.

At the moment, I have to bring in the associated symbol to each piece of equipment (family). Usually by copying it dozens of times.

I’m new to the forum so it’s telling me I can’t upload an example PDF. What would be the next best way to help you guys get eyes-on with what I’m looking at?

Exactly. So yes, this is wildly helpful. Thank you very much. Now I’m going to learn how to actually use dynamo. Pretty sure there are several issues I can solve with it. Thanks again!

Love it. Thanks a bunch guys.

My caution is more around changing the actual geometry. If you’re just adding a graphical symbol then you’re fine, but if you’re replacing a manufacturer’s family with your family, then connections will likely break if connectors aren’t in the exact same locations. That’s the thing you have to look out for.

Okay, I understand what you mean now. No geometry changes. This does also makes sense though.

Again, thanks very much for helping talk through this. It already seems less tedious than I originally thought.

1 Like

Something like this can be ‘easily’ be automated :wink:
with Dynamo.

I don’t have access to a PC right now (i am on mobile currently), but when i have i can give you some pointers / ideas and things to take in consideration. Unless someone is ahead of me :stuck_out_tongue_winking_eye:

1 Like

I would greatly appreciate that. Just kinda going at it blind at the moment

So here are some pointers / food for thought.

  • Filter the Elements you to want to attach a MEP symbol too.
  • Sort / group the different Elements so you can apply the correct MEP symbols to the
    different Elements (if needed).
  • Take into account that Elements can be rotated / mirrored so you might need to do the same for your MEP symbols.
  • Think of were you wanna have your symbols placed. In example; do you want the insertion
    point of your MEP symbol at he insertion point.of the Element.

There are tens of thousands of families though

  • Is the something which is the same for all of those Families? That would make things a lot simpler
    (for filtering purposes).

These points are without knowing how things are set up at your end so i have no idea
if any of these pointers help / apply.

I understand.

The families will only get a corresponding symbol if they have a type parameter value that requires it. Unfortunately not all pieces will need one. For example, sinks only get plumbing symbols, refrigerators only get power. Sink families already have these type parameter values when I import them (1/2" CW, 1/2" HW, etc.) and refrigerators have no plumbing parameters, but will have a voltage parameter (120, 208 etc.). So I’m trying to figure out how I can have a script look at these values, determine if it has one and assign the correct symbol to the associated family.

The hitch is, ALL of these families come in as specialty equipment in revit so filtering would be tough.

First you can filter all the Specialy Equipment you need. Maybe you Specialty Equipment Families
you don’t need int he first place.
Then you can group them by types. So Sink, Refrigerators.


Just an example.

1 Like

You definitely have options for filtering, sorting and grouping. If you are using the same parameter in all elements, then you can filter all specialty equipment where the corresponding parameter has a value. And the sort/group using the value as a key. If you are using different parameters, then filter for the elements where the corresponding parameter has a value. Keep doing this for all of the corresponding parameters. Then you would ultimately have your elements grouped by their type (sinks, refrigerators, etc.). Then sort those groups using the value as a key. Once you have that done, it’s a matter of assigning the correct symbol either based on the parameter value or by the element being tagged.

EDIT
This of course would be in conjunction with what @bvs1982 states about element rotation and placement location of the symbols.

1 Like