Message 1 of 4
IndependentTag grabber code error: An internal error has occurred

Not applicable
08-20-2019
10:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I created a custom Python code that pulls the TagText from IndependentTags in the drawing:
# Import modules and clear references clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference('RevitAPIUI') from Autodesk.Revit.UI import * # variables doc = __revit__.ActiveUIDocument.Document # Create a class to grab wall, from active doc, # and filter out un-wanted types tags_bin = (FilteredElementCollector(doc). OfClass(IndependentTag)) # Ittereate over tags and collect the names list_tags = list() # variable to hold the strings tags_bin = list(tags_bin) for tags in tags_bin: temp = tags.TagText print(temp) list_tags.append(temp) # pritn results print(list_tags)
When I run the code, it grabs some of the TagTexts but then it gives me this error message.
Using Revit Lookup, an Add-in, I discovered that more than half of the IndependentTags has this error message with the TagText.
I had a friend of mine tried recreated it in C# and it still gives the same error message. Don't know how to fix this and any advice would be appreciated.
Running on Revit 2018.3 and using IronPython 2.7.7.