AnsweredAssumed Answered

TableControl GetSeletedObjectIds

Question asked by vteyesriaustralia-com-au-esridist Employee on Oct 2, 2019
Latest reply on Oct 6, 2019 by vteyesriaustralia-com-au-esridist

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

Outcomes