Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Elements Of Category fails for views #2970

Closed
andydandy74 opened this issue Nov 5, 2014 · 17 comments
Closed

All Elements Of Category fails for views #2970

andydandy74 opened this issue Nov 5, 2014 · 17 comments
Assignees
Labels
bug Revit DynamoRevit

Comments

@andydandy74
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link

ksobon commented Nov 6, 2014

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
Copy link
Contributor Author

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
Copy link
Contributor

ikeough commented Nov 14, 2014

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
Copy link

any update here? still there in RC2 0.7.5.

@billingsgr
Copy link

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

@jbenoit44
Copy link

Still an issue in 0.8.2.1601.
image

@ksobon
Copy link

ksobon commented Jul 14, 2015

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

@ikeough
Copy link
Contributor

ikeough commented May 1, 2016

Duplicated by #2313

@ParametricMonkey
Copy link

@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
Copy link

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

@kronz
Copy link
Contributor

kronz commented Jul 4, 2016

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

@QilongTang
Copy link
Contributor

A fix attempt is made, see Pull request as reference: DynamoDS/DynamoRevit#1239

@QilongTang QilongTang self-assigned this Aug 31, 2016
@sm6srw
Copy link
Contributor

sm6srw commented Sep 2, 2016

Fixed in 1.2.

@sm6srw sm6srw closed this as completed Sep 2, 2016
@ikeough
Copy link
Contributor

ikeough commented Sep 6, 2016

👍

@ParametricMonkey
Copy link

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Revit DynamoRevit
Projects
None yet
Development

No branches or pull requests

9 participants