Message 1 of 2
GetElement(id) returning null on existing id

Not applicable
04-07-2020
04:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We are calling app.ActiveUIDocument.Document.GetElement(id) where id is the Revit id for a textnote element. During debugging we confirm that the id exists in the document by selecting it inside the Revit app via the same id. The Revit app selects the right element, but the API call returns null.
The same behaviour was found in Revit 2017-Revit 2020.
Is there any other scenario where the method returns null when it exists ?