Hi, can anyone advise on what is the the proper way to call GetSeletedObjectIds on TableControl. Following the guide on the link below, I have attempted to run GetSeletedObjectIds on both TableControlDockpaneViewModel and TableControlDockpaneView in QueueTask.run. Both resulted in throwing an exception
""The calling thread cannot access this object because a different thread owns it"
ProGuide TableControl · Esri/arcgis-pro-sdk Wiki · GitHub
if (_addToMapCommand == null)
{
_addToMapCommand = new RelayCommand(() =>
{
QueuedTask.Run(() =>
{
try
{
var test = _tableControl.GetSeletedObjectIds().ToString();
}catch(Exception e)
{
return;
}
return;
});
});
}
Thanks
Solved! Go to Solution.
Hi Victor Tey
Unfortunately, this is still not available in 2.4 version of ArcGIS Pro SDK.
For more information refer to the link below:
Hi Victor Tey
Unfortunately, this is still not available in 2.4 version of ArcGIS Pro SDK.
For more information refer to the link below:
Actually the exceptions on GetAllObjectIDs, GetSelectedObjectIDs, GetSelectedRowIndexes and Select methods should have been fixed in ArcGIS Pro 2.3.2. These methods should also work correctly in ArcGIS Pro 2.4
If you are using ArcGIS Pro 2.3, please upgrade to the latest service pack. It is currently Pro 2.3.3 I believe.
If you are still seeing these errors using Pro 2.3.2 or above please post and so that we can investigate further.
Regards
Narelle
Hi Narelle Chedzey, you are right as well. I tested it on 2.4.2 and it is working.
Thanks