Geodatabase - 判断是否处于编辑状态

Engine中提供IDatasetEdit来判断数据是否处于编辑状态,我们知道,在ArcMap中,进行编辑的不一定都是要素类,也可以是表,网络几何等.以下能在ArcMap中进行编辑的数据都实现了 IDatasetEdit接口:

Classes that implement IDatasetEdit

Classes Description
AttributedRelationshipClass Esri Attributed Relationship Class object.
CadastralFabric (esriGeoDatabaseExtensions) A container for querying information about a cadastral fabric.
CadastralFabricFDExtension (esriGeoDatabaseExtensions) A container for describing this cadastral fabric's feature dataset extension properties.
FeatureClass Esri Feature Class object.
FeatureDataset Esri Feature Dataset object.
GeometricNetwork Esri Geometric Network object.
NetworkDataset A container for querying information about a network dataset.
NetworkDatasetFDExtension A container for describing this network dataset's feature dataset extension properties.
NetworkDatasetWorkspaceExtension A container for describing this network dataset's workspace extension properties.
ObjectClass Esri Object Class object.
RasterCatalog A collection of raster datasets in a Geodatabase table.
RouteEventSource (esriLocation) Route event source object.
SchematicDiagramClass (esriSchematic) Schematic diagram class object.
SchematicElementClass (esriSchematic) Schematic element class object.
SchematicInMemoryFeatureClass (esriSchematic) Schematic in memory feature class object.
StreetNetwork A container for describing a street network.
Table Esri Table object.
TemporalFeatureClass (esriTrackingAnalyst) Controls settings for the temporal feature class.
TemporalRecordSet (esriTrackingAnalyst) Defines the COM coclass for the TemporalRecordSet COM object.
Topology Esri Topology object.
UtilityNetwork A container for describing a utility network.
XYEventSource XY event source object.

如下代码演示了判断要素类是否处于编辑状态:

 private void IsEditing() {
ESRI.ArcGIS.Carto.ILayer lyr = mapCtrl_main.get_Layer();
ESRI.ArcGIS.Carto.IFeatureLayer flyr = (ESRI.ArcGIS.Carto.IFeatureLayer)lyr; ESRI.ArcGIS.Geodatabase.IFeatureClass fclass = flyr.FeatureClass;
ESRI.ArcGIS.Geodatabase.IDatasetEdit dsEdit = (ESRI.ArcGIS.Geodatabase.IDatasetEdit)fclass;
bool isEditing = dsEdit.IsBeingEdited();
}
上一篇:怎么让让整个HTML页面变灰


下一篇:Java命名规范