Bug ID Number |
BUG-000172893 |
Submitted | December 6, 2024 |
Last Modified | December 23, 2024 |
Applies to | ArcGIS Pro SDK for .NET |
Version found | 3.4 |
Operating System | Windows OS |
Operating System Version | 10.0 64 Bit |
Status | As Designed
After review by the development team, it has been determined that this behavior is as designed. See the Additional Information section for details.
|
Additional Information
The "List by Data Sources" TOC view _must be active_ otherwise the returned data source member from
GetSelectedDataSourceMember() will always be _null_
Note the "Remarks" at: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic27774.html in the Pro SDK API reference for .GetSelectedDataSourceMember().
"Only one DataSourceMember can be selected at one time.
A DataSourceMember will only be selected when the TOC is in the "List By Data Sources" view mode."
In other words, the moment the TOC view context changes from List By Data Sources to something else (eg List by Drawing Order, List by Selection, etc.) then the selected "DataSourceMember" becomes null.
Workaround
Make the List by Data Sources view in the Contents pane active.
Steps to Reproduce