1 /// <summary> 2 /// 先在窗体上添加LicenceControl控件 3 /// Enable 3D analysis 4 /// </summary> 5 public void Enable3DAnalysis() 6 { 7 ESRI.ArcGIS.esriSystem.IExtensionManagerAdmin iExtensionManagerAdmin = new ESRI.ArcGIS.esriSystem.ExtensionManagerClass(); 8 UID iUid3D = new UIDClass(); 9 iUid3D.Value = "{94305472-592E-11D4-80EE-00C04FA0ADF8}"; 10 object o = new object(); 11 iExtensionManagerAdmin.AddExtension(iUid3D, ref o); 12 IExtensionConfig iExtensionConfig = (IExtensionConfig)(iExtensionManagerAdmin as IExtensionManager).FindExtension(iUid3D); 13 iExtensionConfig.State = esriExtensionState.esriESEnabled; 14 }