Reputation: 11
Is there a tool in Revit that allows to temporary isolate elements by a workset? For example - I have a MEP project and I want to isolate in 3D view all elements which are on Plumbing workset.
By now I found one way of doing it with DiRoots plug-in but it involves a lot of steps and I'm searching for an easier way. Couldn't find such functionality in pyRevit. Correct me if I'm wrong please.
Upvotes: 1
Views: 107
Reputation: 588
we have a script that creates a 3D view for each workset. Essentially it loops through worksets, creates a 3D view, turns all worksets off, then shows the current workset.
For your situation, try this code with your 3D view open:
worksetNameToShow = "Plumbing"
view = ui.ActiveView
worksets = list(FilteredWorksetCollector(doc).OfKind(WorksetKind.UserWorkset))
for workset in worksets:
if workset.Name == worksetNameToShow:
view.SetWorksetVisibility (workset.Id, WorksetVisibility.Visible)
else:
view.SetWorksetVisibility (workset.Id, WorksetVisibility.Hidden)
Upvotes: 0