ArcEngine中UID使用资料收集

UID中value的几种值以及表示的意思:

{6CA416B1-E160-11D2-9F4E-00C04F6BC78E} IDataLayer

{40A9E885-5533-11d0-98BE-00805F7CED21} IFeatureLayer

{E156D7E5-22AF-11D3-9F99-00C04F6BC78E} IGeoFeatureLayer

{34B2EF81-F4AC-11D1-A245-080009B6F22B} IGraphicsLayer

{5CEAE408-4C0A-437F-9DB3-054D83919850} IFDOGraphicsLayer

{0C22A4C7-DAFD-11D2-9F46-00C04F6BC78E} ICoverageAnnotationLayer

{EDAD6644-1810-11D1-86AE-0000F8751720} IGroupLayer


例:

  1. private bool IsLayerExist(string layerName)  
  2. {  
  3.     UID uid = new UIDClass();  
  4.     uid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; // 代表只获取矢量图层  
  5.     IEnumLayer layers = mapControl.get_Layers(uid, true);  
  6.         
  7.     ILayer layer;  
  8.     while(layer = layers.Next() != null)  
  9.     {  
  10.         if (layer.Name == layerName)  
  11.         {  
  12.             return true;  
  13.         }  
  14.     }  
  15.   
  16.     return false;  

转载自:
http://blog.csdn.net/zy332719794/article/details/7469477

http://blog.sina.com.cn/s/blog_4f9387ab0100i2ag.html
http://hi.baidu.com/steeeeps/item/103d0a491ed33408c116138d
 

原文地址:https://www.cnblogs.com/wuhenke/p/2573190.html