Arcgis [Add-In] FeatureLayer의 Datasource를 바꾸는 코드 퐁퐁 2013. 2. 14. 17:14 public static void SetDataSource(IMap p_map, string p_layerName, string p_featureClassName) { IMapAdmin2 mapAdmin = (IMapAdmin2)p_map; IFeatureClass newFeatureClass = GetFeatureClassByName(p_featureClassName); if (newFeatureClass == null) return; ILayer layer = GetLayerByName(p_map, p_layerName); if (!(layer is IFeatureLayer)) return; IFeatureLayer featureLayer = (IFeatureLayer)layer; IFeatureClass oldFeatureClass = featureLayer.FeatureClass; if (oldFeatureClass == newFeatureClass) return; featureLayer.FeatureClass = newFeatureClass; mapAdmin.FireChangeFeatureClass(oldFeatureClass, newFeatureClass); return; } 공유하기 게시글 관리 딸기아빠 저작자표시 'Arcgis' 카테고리의 다른 글 [Add-in] 인쇄용 template 자동으로 적용하기 (0) 2013.02.15 'Arcgis' Related Articles [Add-in] 인쇄용 template 자동으로 적용하기