摘要: 1 AO 显示label label转annotation 使用gp工具转换: createCadXData 添加附加属性 ExportCAD2 AE 转dxf anno转换时有问题 下面为转换dxf的代码:using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Globalization;using ESRI.ArcGIS.Geometry;using ESRI.ArcGIS.Geodatabase;using ESRI.ArcGIS.... 阅读全文
posted @ 2012-02-15 15:38 因是因非 阅读(2792) 评论(2) 推荐(0) 编辑
摘要: 因使用AutoCAD版本为2004,2006版本以后才有.net开发包,因此采用ActiveX方式进行开发。功能为:将几个CAD图层合并到其中一个上,并设置坐标,线和标记的颜色和字体。CAD对象的层级为AcadApplication - AcadDocument - AcadModelSpace AcadEntity 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawin... 阅读全文
posted @ 2012-02-15 15:22 因是因非 阅读(1937) 评论(0) 推荐(0) 编辑
摘要: //新建excel文件,编辑、格式化、保存 1 Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application(); 2 Workbook workbook = app.Workbooks.Add(true); 3 Worksheet sheet = (Worksheet)workbook.Worksheets["sheet1"]; 4 sh... 阅读全文
posted @ 2012-02-15 15:09 因是因非 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 简单项目中可使用ini做为配置文件,操作类如下。 1 public class INIClass 2 { 3 public string inipath; 4 [System.Runtime.InteropServices.DllImport("kernel32")] 5 private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); 6 [System.Ru... 阅读全文
posted @ 2012-02-15 11:32 因是因非 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1 判断文件夹是否存在 1 /// <summary>文件夹是否存在 2 /// </summary> 3 /// <param name="dir"></param> 4 /// <returns></returns> 5 public static Boolean isFolderExist(string dir) 6 { 7 if (System.IO.Directory.Exists(dir)) 8 return true; 9 return false;10... 阅读全文
posted @ 2012-02-15 11:17 因是因非 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 空间关系计算两点间距离1 /// <summary>计算两点间距离2 /// </summary>3 /// <param name="point1"></param>4 /// <param name="point2"></param>5 /// <returns></returns>6 public static double getDistanceOfTwoPoints(ESRI.ArcGIS.Geometry.IPoint point1, ESRI.A 阅读全文
posted @ 2012-02-15 10:27 因是因非 阅读(4194) 评论(1) 推荐(0) 编辑