I’m trying to make a few scripts to upgrade older projects to implement quality checking and energy analysis.
One element is a filter that highlights the exterior walls, based on a parameter (Part of building envelope) If I create the filter in revit, and use dynamo to apply it to a view, everything works like a charm.
However, if I create the filter in an older project with dynamo (with one script) and run the same script, the filter is applied with all the right settings but without affecting the view. If I manually change the setting from “AND” to “OR” (or the other way around) the view will be affected. So it seems like Revit wont fully reckognize the filter until some change has been made.
Any way to “poke” a filter to make it “wake up”?
Revit seems to need a budge as far as visual filtering, I’m sure there should be a way to re-load the current view, or even loading a second view, and then going back to the primary view.
Add a transaction.end node and a transaction.start node in between the creation of the filter and the application to the view. Alternatively you may need to force a regeneration of the view. Close the view, process it in the background via Dynamo, and then open it to see what results you get.
I’ll look into the reload view procedure
Haven’t tried the transaction.start or end nodes before, I’ll look into it. But as it is now, it’s already to different scripts creating the filter and applying it
Ok - if it’s different graphs try running it in a closed view and opening that.
@JacobSmall To make it more versatile, the graph registers the open view so the user can look at the walls on a plan view or 3D view, so a closed view would require a UI box with choice of view. I just tested with an open.window from Orchid after a transaction.end + transaction.start without result. Manually closed the view and reopened with no effect.
Closing and opening won’t work as it doesn’t necessarily trigger a regen (the view is marked as ‘good to go’ when you opened it last time). Can you post the graph and a sample rvt?
I’ll create a small sample file tomorrow and upload it with the graphs. Time for family now
apply filter.dyn (40.1 KB)
generate filter.dyn (23.5 KB)
Test - Building envelope.rvt (424 KB)
@JacobSmall Here’s something to experiment with. Please let me know if you need anything further