Does View.AddFilter supports Area Plans?

Is there a workaround for Add.ViewFilter (OOTB) when working with AreaPlans?
It doesn’t seem to accept the ViewType when it is an AreaPlan,
Other ViewTypes do seem work in the same graph.

Dynamo 1.3.2
Revit 2017.2

I feel like this is something @Konrad_K_Sobon has fixed / or has a PR for.

1 Like

The package Hot Gear has a node called “Add Filter to View” that works with area plans


Area Plans support was merged here:

That would mean it is available in 2.0 or in dailies.

@Michael_Kirschner2 you did cherry picks for it, and fixed bunch of stuff on that PR. Thanks!


:stuck_out_tongue: @Konrad_K_Sobon it’s tough to keep track sometimes, thanks for your prs!

1 Like


I tested the Hot Gear package and it’s Node, i’m sorry to take back the solution tickmark as its not working for me. i will try a latest stable (1.3.3) (2018-11-april) to see if that works. Since the change in login routine on the forum i cannot login in from my computer at work, therefore i’m not able to post my workflow, and not having the time to clear this up doesn’t help also.

@Marcel_Rijsmus I just had a look and I couldn’t get the Hot Gear node to function without taking it out of the custom node and chopping the script up, so I just rewrote it differently. Tested and it works for area plans in Revit 2018.3 with Dynamo 1.3.2

import clr
from Autodesk.DesignScript.Geometry import *

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

import Revit

views = IN[0]
if not isinstance(views,list):
	views = [views]
filters = IN[1]
if not isinstance(filters,list):
	filters = [filters]

def addFilter(views,filterid):
	for view in views:
		view = UnwrapElement(view)

for filter in filters:
	filter = UnwrapElement(filter).Id

OUT = views,filters

thank you for your time, i will give it a go on monday and let you know.


1 Like

Nice one!!!

I tested it on Area plan and it was working :slight_smile:

Was also looking for a code like this

Thank you a lot, been looking for long for some codes solve the area plans issues with view filters.

It would be really great help if you can post 2 important code to complete solving the issues with area plans

1- collecting view filters from area plan view
2- area plan views set filter override

Thanks you

@mohamed.mostafaDQCGU glad that the script is helpful for you!

Please read this post if you have not already:

@awilliams what i am actually trying to do, is, thanks for you we can add filter to area plans which wasnt applicable before, but the a bit step further i am looking for, to override these filters in th area plans as you can se below

Unfortunately am not a python user yet, so i would really be thankful if you can help with another code for this step
Thank you a lot