DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.74k stars 634 forks source link

All Elements Of Category fails for views #2970

Closed andydandy74 closed 8 years ago

andydandy74 commented 10 years ago

Using All Elements Of Category on the Views category will results in the following warning: Warning: ElementQueries.OfCategory operation failed. View cannot be a template view. The same happens when using All Elements Of Type

andydandy74 commented 10 years ago

Fun fact: in 0.6.3 this used to work... I had a go at this using a Python node in 0.7.x and noticed that the warning/exception is thrown when converting the FilteredElementCollector to actual Revit elements using the ToElements() method. Strangely enough, it is not possible to catch it using try/except or even going through the iList of the collection one by one and catching it on a per-element basis. I don't really know what to make of this...

ksobon commented 10 years ago

Its because of the new Revit API that now includes view templates in a view category. I wrote a node for this: http://archi-lab.net/?p=1074 You just have to check if view.IsTemplate and exclude that from search. Good luck!

andydandy74 commented 10 years ago

No, @ksobon , that can't be the reason. When I try this on top of Revit 2014 with 0.6.3 it works and with 0.7.3 it doesn't. So obviously it's Dynamo, not the Revit API. It seems like Dynamo 0.7.x is handling (some) warnings/exceptions differently.

ikeough commented 10 years ago

You are both correct. @ksobon is correct that the template view thing is causing headaches, and @andydandy74 is correct that this worked in 0.6.3. We changed the way that we do this filter collection in 0.7.x and didn't account for the new functionality that throws this exception.

Tracking internally: http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5431

jbenoit44 commented 9 years ago

any update here? still there in RC2 0.7.5.

billingsgr commented 9 years ago

I have Dynamo 0.8.0.950 and this is still an issue? How do we deal with this View Template Error?

jbenoit44 commented 9 years ago

Still an issue in 0.8.2.1601. image

ksobon commented 9 years ago

Mhmmm, can we get this solved? It would be nice. Thanks!

ikeough commented 8 years ago

Duplicated by #2313

ParametricMonkey commented 8 years ago

@ikeough Still an issue in 1.0.1 on Revit 2016 r2. Can we get this solved. It looks like its been around for a while now.

dynmo_views

ParametricMonkey commented 8 years ago

@ikeough @kronz Can someone have a look at this please

kronz commented 8 years ago

We'll get his for 1.2. Sorry, this one fell between the cracks.

QilongTang commented 8 years ago

A fix attempt is made, see Pull request as reference: https://github.com/DynamoDS/DynamoRevit/pull/1239

sm6srw commented 8 years ago

Fixed in 1.2.

ikeough commented 8 years ago

:+1:

ParametricMonkey commented 7 years ago

@kronz @ikeough I'm running Dynamo v1.2.1.3083 and I am still getting this problem. I thought this had been fixed? It works sometimes but not others and i can't work out why

ParametricMonkey commented 7 years ago

The warning is slightly different thought; "Warning: ElementQueries.OfCategory operation failed. The managed object is not valid."