博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  ArcEngine

摘要:AE的版本随着时间的流逝也在渐渐的升级,一直升级到目前的AE10,由于版本的问题,原来低版本的采用AE组建写的App因为版本的问题也就不能直接运行了,这样就需要直接对这些AE组建升级,然后根据实际情况进行调试程序。1)第一种升级方法打开原程序中的 引用文件夹,我们可能会看到有些引用的名称前面有黄色的感叹号,这就表示该引用是不能用的,这个就是升级带来的问题,解决方法:将带有黄色感叹号的引用删除,然后重新添加相应名称的引用即可,以此类推,将黄色的引用重新添加,然后程序就可以运行了。2)第二种升级方式这种升级方式也是最近知道的,找到文件扩展名称为.csproj的文件,比如 EditorApp.csp 阅读全文

posted @ 2011-06-09 08:34 星尘的天空 阅读(915) 评论(0) 推荐(0)

摘要:ILayer pLayer ;IFeatureLayer pFeatureLayer = (iFeatureLayer)pLayer ;IGeoDataset pGeoDs = (pFeatureLayer.featureClass) as iGeoDataset;ISpatialRefrence spatialRefrence = pGeoDs.spatialRefrence; 阅读全文

posted @ 2011-05-05 14:19 星尘的天空 阅读(274) 评论(0) 推荐(0)

摘要:分级渲染地图后,要将渲染后的结果显示到地图控件,以及TOC空间中,更新TOC控件的方法是:MapControl3.ActiveView.ContentsChanged();PS:之前已经要将TOC控件和MapControl控件绑定 阅读全文

posted @ 2011-04-26 11:19 星尘的天空 阅读(337) 评论(0) 推荐(0)

摘要://Get the ArcGIS install locationstring sInstall = ESRI.ArcGIS.RuntimeManager.ActiveRuntime.Path;PS:需要添加一个应用:ESRI.ArcGIS.Version应用:目前的一个应用就是用来获取ArcGIS的 *.ServerStyle样式文件 阅读全文

posted @ 2011-04-25 16:52 星尘的天空 阅读(571) 评论(0) 推荐(0)

摘要:2011年4月20日升级ArcEngine组建搭建的App应用程序方法问题:从ArcGIS 9.3升级到ArcGIS10后,原来写的ArcGISEngine应用程序无法运行解决方法:打开项目中的Refrence目录,将里面的前面有黄色(注意是黄色的)的Reference干掉,然后将之前的干掉的Reference再添加进来.然后再app的入口处添加下面的一行代码//在ArcAGIS 10 下需要添加的代码ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);注意此时要添加一个引用,命名名称为:ESRI.A 阅读全文

posted @ 2011-04-20 17:17 星尘的天空 阅读(363) 评论(0) 推荐(0)

摘要:今天将ArcGIS系列的软件从ArcGIS9.3.1升级到ArcGIS10,然后就使用VS创建一个简单的AE应用程序,然后拖放一个toolbar、LicenseControl以及MapControl控件。接着编译应用程序,编译成功。然后单击F5运行程序,这个时候程序报错,出现下面所示的错误:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components.问题解决方案:在系统的入口添加下面的一行代码:ESRI.ArcGIS.RuntimeManager.Bi 阅读全文

posted @ 2011-04-19 17:10 星尘的天空 阅读(4238) 评论(4) 推荐(4)

摘要:IStyleGallery 和IstyleGalleryItem以及IStyleGalleryStorage接口理解IStyleGalleryStorage Provides access to members that manage the files used in the Style Gallery. Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.Description IStyleGalleryStorage is used to manage the styles that can then be ed 阅读全文

posted @ 2011-04-18 08:30 星尘的天空 阅读(1800) 评论(2) 推荐(1)

摘要:AE 下渲染地地图2011年4月6日参考代码:IRgbColor color = new RgbColorClass();//定义填充颜色color.Red = 255;color.Green = 0;color.Blue = 0;ISimpleFillSymbol sym = new SimpleFillSymbolClass();//定义填充样式sym.Color = color;//指定填充样式的颜色ISimpleRenderer renderer = new SimpleRendererClass();//定义渲染对象renderer.Symbol = sym as ISymbol;/ 阅读全文

posted @ 2011-04-06 10:36 星尘的天空 阅读(326) 评论(0) 推荐(0)

摘要:What is the difference between searching a featurelcass versus a featurelayer?IFeatureClass.Search: Returns an object cursor that can be used to fetch feature objects selected by the specified query.IFeatureLayer2.Search:Use this method to return a read-only cursor of the layer’s features.There is ‘ 阅读全文

posted @ 2011-03-21 09:00 星尘的天空 阅读(368) 评论(0) 推荐(0)

摘要:1、工具号 如放大,需要在mousedown执行,设置CurrentTool,这种AE内置的命令,是需要与用户的进一步互动才能完成后即的操作的 ICommand pCommand = new ESRI.ArcGIS.Controls.ControlsMapZoomInToolClass(); pCommand.OnCreate(axMapControl1.Object); axMapControl1.CurrentTool = pCommand as ITool;2、直接执行 如查看整个视图,需要加OnClick();,不需要设置CurrentTool,这个不需要和用户进行互动,仅仅需要单击一 阅读全文

posted @ 2011-02-28 15:28 星尘的天空 阅读(1372) 评论(0) 推荐(0)

摘要:我们在AE的有的时候需要用户自定义某些颜色,这里我们可以调用系统的拾色器来选择用户喜欢颜色参考代码 //Create new ColorDialog controlColorDialog colorDialog = new ColorDialog();//Show the ColorDialog and exit if user cancelled if (colorDialog.ShowDialog() == DialogResult.Cancel) { return; }//Get color from ColorDialogSystem.Drawing.Color color = col 阅读全文

posted @ 2011-02-25 16:31 星尘的天空 阅读(304) 评论(0) 推荐(0)

摘要:/// <summary> /// 删除字段值 /// </summary> /// <param name="pCurrentLayer"></param> /// <param name="fieldName"></param> public static bool DeleteILayerField(ILayer pCurrentLayer, string fieldName) { try { IFeatureLayer pFeatureLayer = (IFeatureLay 阅读全文

posted @ 2011-02-23 14:49 星尘的天空 阅读(539) 评论(0) 推荐(0)

摘要:C# code //2011年2月23日//来源:互联网//***********************************************pFeatureLayer = pLayer as IFeatureLayer;pFeatureClass = pFeatureLayer.FeatureClass;IField pField = new FieldClass();IFieldEdit pFieldEdit = pField as IFieldEdit;pFieldEdit.Name_2 = textBoxFieldName.Text.ToString();pFieldEdi 阅读全文

posted @ 2011-02-23 14:01 星尘的天空 阅读(757) 评论(0) 推荐(0)