Active View with Area Plan

Hello all,

I am trying to gather all grids in the active view (an Area Plan). My script works fine with Floor plans but fails when the Active view is an Area Plan. Anyone have an Idea?

Similar issue:

Originally reported here:


And solved here:

So this should work in Dynamo 2.0 … :slight_smile:

2 Likes

Hi @Steven

Or else you can just write a few lines of python to get it worked in Dynamo1.3.2 :slight_smile:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager


view = UnwrapElement(IN[0])


doc = DocumentManager.Instance.CurrentDBDocument

coll = FilteredElementCollector(doc, view.Id)
filt = ElementCategoryFilter(BuiltInCategory.OST_Grids)
grids = coll.WherePasses(filt).ToElements()

#Assign your output to the OUT variable
OUT = grids
3 Likes

Thanks Andreas,

I was looking around but could not find anything.

Thanks Kulkul,

That worked perfectly.

@Steven Please mark the post as solved. You’re welcome!

Sorry I thought I clicked it. :slight_smile:

The equivalent node in springs is called “Collector.ElementsInView” :wink:

3 Likes

Will this ever be solved for dynamo 1.3?

1 Like