In ArcGIS Pro 2.9, OnDrawComplete event doesn't always wait until drawing is complete

268
1
01-06-2022 07:25 AM
BarbaraSchneider2
Occasional Contributor II

In my ArcGIS Pro Add-In, when a project is started, I wait until drawing is complete using the OnDrawComplete event. I then access the map using MapView.Active.Map. But sometimes, the map is null. This only happens since I installed 2.9. In previous versions, this worked fine.

I noticed that the TOC draws after the map drawing is complete. The map is null before the TOC drawing is complete.

0 Kudos
1 Reply
BarbaraSchneider2
Occasional Contributor II

I have found a workaround for this problem. When I make the TOC as small as possible (remove unused layers, collapse layers), the problem doesn't appear.

Tags (2)
0 Kudos