Internal Error: Keynote Tags - All Elements of Category

Getting the following warning:
Warning: ElementQueries.OfCategory operation failed. An internal error has occured

Using Dynamo
Oddly, error does not pop up for Dynamo 0.9


what version of revit are you using?

Revit 2017

Same model for both Dynamo versions?


probably you need to update revit see also:

Any luck with this? Did updating Dynamo fix the issue?

I am having the same problem with fully updated Revit 2019 and Dynamo 2.02. Also Archilab Get All keynote Tags is also not returning anything. The All Elements of Category returns elements when set to something other than Keynotes. Not sure but it seems to be a problem that could point to a change in the API or keynote system that no longer allows that type of selection.

@s.knight-williamson, I also get the same issue in a file with around 4000 Keynotes. However, if I create a brand new file and place a few test Keynotes in it, I have no issues selecting them using the Keynotes>All instance of category method.

Running Revit 2018 and Dynamo

Would love it if someone could share a fix for this.

1 Like

I had this issue a while ago as well. I think I was able to get my keynotes through Python as a workaround.

Hi @Nick_Boyts can you explain what was your Python workaround? I am having the same issue.

I probably just used a filtered element collector.

Thank you so much @Nick_Boyts … it seems to work for some views but for others, it doesn’t. It is super weird, I am not able to find the difference between the views that work and the ones that don’t.
If you have any suggestions, or if this happened to you as well, please let me know.
Thanks for all your help.

This is happening with an element collector? Can you show us what you have?

Import DocumentManager and TransactionManager

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

#The inputs to this node will be stored as a list in the IN variables.
doc = DocumentManager.Instance.CurrentDBDocument
view = UnwrapElement(IN[0])


#Filtered Element Collector
collector = FilteredElementCollector(doc, view.Id)

#Quick Filter
filter = ElementCategoryFilter(BuiltInCategory.OST_KeynoteTags)
tags = collector.WherePasses(filter).ToElements()

#Transaction done

#Assign your output to the OUT variable.
OUT = tags,view

Not 100% sure, but you may not need that transaction. Since you are not making any changes to the database, just getting information.

Thank you so much @kraftwerk15 for your comment. I forgot to mention that I am also revealing hidden elements from views… I removed that part from the one that I sent in order not to confuse. I forgot to remove the transactions… But that is not what is generating the issue… it is just that 20% of the KeyNote Tags are not showing up and I have no idea why.

If you’re trying to get all tags in the project then the View is irrelevant. Just use FilteredElementCollector(doc) instead of the view specific collector.

Thank Nick, It didn’t work… but I will keep trying. It is definitely a bug with these Keynote Tags. Thanks for all your help

I think you’re making it a little more difficult than it needs to be. Try getting them directly like this:

collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_KeynoteTags).WhereElementIsNotElementType().ToElements()