laptop and a wrench

Bogue

The IFeatureSelection.SelectFeatures Method throws (RPC_E_SERVERFAULT ) exceptions when called with a query filter on an ArcMap dataset from an external Windows Forms application

Dernière publication: December 22, 2016 ArcObjects SDK
Numéro d’ID de bogue BUG-000096943
EnvoiJune 7, 2016
Dernière modificationJune 5, 2024
S’applique àArcObjects SDK
Version trouvée10.4
Système d’exploitationWindows OS
Version du système d’exploitation7.0 64 Bit
StatutWill Not Be Addressed

Informations supplémentaires

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Solution de contournement

Use the IObjectFactory ArcObjects to get around the problem:C# Code:[STAThread()] static void Main(string[] args) { //ESRI License Initializer generated code. m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced }, new esriLicenseExtensionCode[] { }); //ESRI License Initializer generated code. IAppROT pROT = new AppROT(); int itmCnt = 0; IApplication pAPP = null; while (itmCnt < pROT.Count) { pAPP = pROT.Item[itmCnt]; if (<a href="http://pAPP.Name" target="_blank">pAPP.Name</a> == "ArcMap") break; itmCnt++; } IMxDocument pMX = pAPP.Document as IMxDocument; IFeatureLayer pFL = pMX.FocusMap.Layer[0] as IFeatureLayer; IFeatureSelection pFSel = pFL as IFeatureSelection; ///TestConsole application space IQueryFilter pQF = new QueryFilter(); /// appRot application space IObjectFactory objectFactory = (IObjectFactory)pAPP; IPersist persist = (IPersist)pQF; System.Guid typeClassID; persist.GetClassID(out typeClassID); pQF = (IQueryFilter)objectFactory.Create(typeClassID.ToString("B")); pQF.WhereClause = "1=1"; IFeatureClass FC = pFL.FeatureClass; IFeatureCursor pFeatCursor = FC.Search(pQF, false); //pFSel.SelectionSet.Select(pQF, esriSelectionType.esriSelectionTypeHybrid, esriSelectionOption.esriSelectionOptionNormal, ((IDataset)pFL.FeatureClass).Workspace); pFSel.SelectFeatures(pQF, esriSelectionResultEnum.esriSelectionResultNew, true); //Do not make any call to ArcObjects after ShutDownApplication() }

Étapes pour reproduire

ID de bogue: BUG-000096943

Logiciel:

  • ArcObjects SDK

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement