Auto Assign Elements to Worksets

Not sure if this is possible. I was pitching the idea around of coming up with a way to auto-assign elements to worksets, regardless of what workset is set in the Revit interface
image

The idea is pretty simple. If you draw piping related elements, automatically assign them to a piping/plumbing workset. If you are drawing mechanical related elements (duct, duct accessory, mech equipment, duct fittings), automatically assign them to a duct workset. So on and so forth.

Not sure if this is achievable. I would imagine that the model would have to constantly run checks of elements which could bog down the performance. Or maybe it only applies when the element first appears in the model?

Has anyone attempted something of the sorts?

1 Like

This is actually fairly simple to make, you will find something similar in the link worksets tool.
You would need to build some sort of ui to math categories to worksets names OR read a CSV with that matching

You could even do this as an event driven app that requires no intervention or UI.

But why!
MEP elements are already clearly categorized - so that, view templates and possibly filters takes care of all visibility needs. Worksets for visibility area soooo - 1990’s AutoCAD layer’ish.

5 Likes

I understand exactly why you would do such a thing!

Because for some god-forsaken reason, the entire industry demands that MEP elements go on a workset for each discipline. Everyone I have ever worked with considers this “Standard Practice”.

I consider it standard malpractice.

Anyone who has watched a 10 minute youtube video about computer science knows that requiring a user to manually assign worksets to every object for visibilty is bat-poop insane (and reminiscent of outdated paradigms such as Autocad layers). Unfortunately, few people have watched the 10-minute video, so because they can’t spare the ten minutes, I must labor for months to come up with solutions.

I tried to explain to a client that it makes much more sense to rely on object categories for visibility rather than worksets, since elements frequently get placed on the wrong workset. This is the response I got (editor notes added by me):

I get the difficulty with remembering to put this or that item on which workset (I still struggle with it myself), but as I understand it worksets are a standard in BIM modeling and very much needed for our project work. This goes beyond just for visibility purposes. We understand this takes an additional amount of time when modeling to make sure model elements are organized properly, but we see this as a standard practice. There are also quick ways to QC this and batch change items on the wrong workset at various check points across the project lifecycle. {Editor note: Quick compared to what? You can’t get much quicker than not having to do it at all.}

I issue with hiding elements is that multiple disciplines often share the same Revit Categories when it comes to content. {Editor note: They shouldn’t.} For example, Mech, Elec, and Plumb disciplines all use Electrical Equipment, Generic Models, Specialty Equipment, Pipe Accessories, etc. {Editor note: They shouldn’t. If a discipline can’t properly assign a category to an equipment family, what makes you think they can properly assign a workset to each and every element in the model?} Design teams will need to isolate that content on various plans and during coordination. This could only be done if all content is broken down into subcategories, but that opens up an entire other series of issues. {Editor note: Yes, there ought to be subcategories that can be used to effectively show things from different disciplines in different views. Using worksets to fulfill this purpose comes with the issue that an element can only belong to one workset. This severely limits one’s ability to make things appear on the correct sheets. The number of worksets tends to proliferate when you need to show something on both mechanical and power plans, but not plumbing plans, except the enlarged plumbing plans.} With that said, this is not something we can control out of the box by categories, primarily because all disciplines will be modeled within one Revit model. This would take a large amount of time at various stages of the project to parse through these family categories and set up view templates and filters properly. {Editor note: We have this exact same problem currently with worksets.}

We would prefer to have worksets for every major Discipline and subdiscipline.

To be fair to him, Autodesk’s MEP categories are not adequate to accomplish the type of filtering that is necessary. They only added plumbing equipment since 2023, afterall. But rather than resorting to worksets to fix this, there has to be a better way!

In my case, I chose to add a text parameter to every family in our library, then set default values that are read by view filters to ensure each element is shown in the correct view. If need be, you can even override it by instance. Boy howdy, it took a long time to do all that, but the system functions pretty much automatically now. It has more capabilities AND more flexibility than worksets, and doesn’t require constant mental effort. It can get quite complex, but you just set it and forget it, resulting in less work overall.

If a client asks for things on separate worksets, I can programmatically assign every element to the correct workset and be 100% SURE that every element is on the correct workset without having to scour the model for mistakes.

You could potentially improve the process even more by using updaters, but I know from experience how much of a nightmare updaters can be. They are awesome when they function properly, but they take an EXTREME amount of development to avoid problems. I wrote an updater framework for pyRevit that is 2750 lines of code. Took over a year of intermittent development time.

Of course, all this effort and complexity shouldn’t be necessary. Autodesk should just design the software so that this standard functionality is handled internally, but you know how that goes!

@Frank_L you deserve an Pulitzer for the longest post :grin:

3 Likes

Worksets need to die.

2 Likes