C# 如何通过API使层在ArcMap中只能选择
在ArcMap中,任何图层都只能通过右键单击->选择->使其成为唯一可选择的图层。C# 如何通过API使层在ArcMap中只能选择,c#,arcgis,arcmap,C#,Arcgis,Arcmap,在ArcMap中,任何图层都只能通过右键单击->选择->使其成为唯一可选择的图层。 我想通过ArcMapAPI以编程方式实现这一点。我是arcgis的新手。我用这种方式解决了这个问题:非常简单的解决方案,我是arcgis的新手 private void MakeOnlySelectableLayer(IFeatureLayer stationFeatureLayer) { var Focusmap = ArcMap.Document.FocusMap; for (int i =
我想通过ArcMapAPI以编程方式实现这一点。我是arcgis的新手。我用这种方式解决了这个问题:非常简单的解决方案,我是arcgis的新手
private void MakeOnlySelectableLayer(IFeatureLayer stationFeatureLayer)
{
var Focusmap = ArcMap.Document.FocusMap;
for (int i = 0; i < Focusmap.LayerCount; i++)
{
if (Focusmap.get_Layer(i) is IFeatureLayer)
{
IFeatureLayer layer = (IFeatureLayer)Focusmap.get_Layer(i);
if (stationFeatureLayer != null && !stationFeatureLayer.Equals(layer))
{
layer.Selectable = false;
}
}
}
}
private void仅生成可选择的图层(IFeatureLayer Station FeatureLayer)
{
var Focusmap=ArcMap.Document.Focusmap;
对于(int i=0;i