laptop and a wrench

不具合

Deleting a topology results in the inability to edit feature classes that had participated in that topology, unless ArcMap is closed and launched again.

最後に公開された状態: August 19, 2020 ArcGIS for Desktop
不具合 ID 番号 NIM070232
送信されましたJuly 6, 2011
最終更新日June 5, 2024
適用対象ArcGIS for Desktop
見つかったバージョン10.0
プログラム言語C#
ステータスWill Not Be Addressed

参考情報

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.

対処法

//ArcMap.Document is used because this workaround was tested in an Add-In button for Arcmap.IMxDocument pDoc = ArcMap.Document; IMap pMap = pDoc.FocusMap;IDataset pDataset = null;IFeatureLayer pFeaLayer = (IFeatureLayer)pMap.get_Layer(0);string lName = pFeaLayer.Name;IFeatureClass pFeaClass = pFeaLayer.FeatureClass; ITopologyClass pTopoClass = (ITopologyClass)pFeaClass; ITopology pTopo = (ITopology)pTopoClass.Topology;IDataset pFCDataset = (IDataset)pFeaClass;string name = pFCDataset.Name;IWorkspace pWorkspace = pFCDataset.Workspace;IDataset pWsDataset = (IDataset)pWorkspace;IWorkspaceName pWSName = (IWorkspaceName)pWsDataset.FullName;IGxDatabase pGxDatabase = new GxDatabase();pGxDatabase.WorkspaceName = pWSName;IGxObject pObject = (IGxObject)pGxDatabase;pDataset = (IDataset)pTopo;if (pDataset.CanDelete()){ pDataset.Delete(); //At times objects will inherit from a given object and there will be several //instances in memory. We need to dump all of the references to the object //in memory by placing the releaser in a while loop, until all the references are gone //the Releaser will keep going. while (Marshal.ReleaseComObject(pDataset) > 0) { };}pObject.Refresh();while (Marshal.ReleaseComObject(pFeaClass) > 0) { };//disconnect and delete the layer from the mapIDataLayer2 dl = (IDataLayer2)pFeaLayer;dl.Disconnect();pMap.DeleteLayer(pFeaLayer);while (Marshal.ReleaseComObject(pFeaLayer) > 0) { };//the workspace reference does not seem to impact this so we can continue to use this referenceIFeatureWorkspace fw = (IFeatureWorkspace)pWorkspace;IFeatureClass fc = fw.OpenFeatureClass(name);//we got the name of the feature class and layer but they could also look at options to preserve //other aspects of the layers state...symbology, ect. if necessaryIFeatureLayer fl2 = new FeatureLayer(){ FeatureClass = fc, Name = lName, ShowTips = true};//the re-added layer should be editablepMap.AddLayer(fl2);

再現の手順

不具合 ID: NIM070232

ソフトウェア:

  • ArcGIS for Desktop

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動