Get drafting view name of an annotation element?

Hello guys, is there a way to “get” the name of the 2D view an detailing/annotation element is in as string? I’m trying to get the view names where my detail items (filled regions) are in. Thank you.

Very short answer to be developed, here’s how to sort elements by drafting views:

bv Elements in Views is from Bakery

Second short answer, as it seems not so easy to get filled regions properties in Dynamo, see maybe with Get Filled Regions from Archi-Lab Grimshaw

There’s a custom node in the ‘MEPover’ package called 'Tag Get View" which will work with any annotation actually.

Or you could use this python code:

import clr

import RevitServices
from RevitServices.Persistence import DocumentManager
doc =  DocumentManager.Instance.CurrentDBDocument

if isinstance(IN[0], list):
	tags = UnwrapElement(IN[0])
	tags = [UnwrapElement(IN[0])]

listout = []

for x in tags:
	Id = x.OwnerViewId
	view = doc.GetElement(Id)

OUT = listout

Or use Clockwork’s ‘Element.OwnerView’::

1 Like

Indeed, Element.OwnerView works great along with Get Filled Regions
Also some similar discussion here:

WoW guys, you probably fixed my problem in every way possible. Element.OwnerView works perfectly and is very simple, so I went with that. Thank you all.