public override void FillDatabase(Teigha.DatabaseServices.Database pDb)
{
IFeatureClassContainer pFeatureClassContainer = pCADFeatureDataset as IFeatureClassContainer;
IEnumFeatureClass pEnumFeatureClass = pFeatureClassContainer.Classes;
IFeatureClass pFeatureClass = pEnumFeatureClass.Next(); while (pFeatureClass != null)
{
LoadLayer(pFeatureClass, pDb);
Debug.WriteLine(pFeatureClass.FeatureType.ToString() + "-" + pFeatureClass.AliasName + "-" + pFeatureClass.ShapeType.ToString());
pFeatureClass = pEnumFeatureClass.Next();
}
}
private void LoadLayer(IFeatureClass pFeatureClass, Teigha.DatabaseServices.Database pDb)
{ int indx = pFeatureClass.FindField("Layer");
int idxColor = pFeatureClass.FindField("Color");
int idxText = pFeatureClass.FindField("TxtMemo");
int idxHandle = pFeatureClass.FindField("Handle"); pCursor = pFeatureClass.Search(null, false);
IFeature pFeature2 = pCursor.NextFeature();
//写入点线 if (pFeatureClass.FeatureType == esriFeatureType.esriFTCoverageAnnotation)
{
while (pFeature2 != null)
{
string geoName = "C_" + pFeature2.get_Value(indx).ToString();
string sAnnotation = pFeature2.get_Value(idxText).ToString();
IPoint pPoint = pFeature2.Shape as IPoint;
double x = , y = ;
pPoint.QueryCoords(out x, out y);
Point3d pt = new Point3d(x, y, );
addTextEnt(modelSpaceId, pt, pt, sAnnotation, , TextHorizontalMode.TextLeft, TextVerticalMode.TextTop, LayerNames[geoName], ttfStyleId);
pFeature2 = pCursor.NextFeature();
}
}
else
{
if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPoint)
{
while (pFeature2 != null)
{
IPoint pt = pFeature2.Shape as IPoint;
pFeature2 = pCursor.NextFeature();
}
}
else if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolyline)
{
short shtColor = ;
while ((pFeature2 = pCursor.NextFeature()) != null)
{
string geoName = "C_" + pFeature2.get_Value(indx).ToString();
}
}
else if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)
{
short shtColor = ;
while ((pFeature2 = pCursor.NextFeature()) != null)
{
string geoName = "C_" + pFeature2.get_Value(indx).ToString();
}
}
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(pCursor);
pCursor = null;
}
}

AE读取CAD图层包括注记的更多相关文章

  1. AE指定字段转成注记

    转自原文 ae指定字段转成注记 ArcMap中有一个功能是Label Features,就是可以将图层内指定字段值显示以Label形式显示在主窗口上,在Label Features后,用右键点击图层, ...

  2. ArcGIS连带文字注记导出为CAD格式

    可以使用ArcGIS的"Export To CAD"工具将点.线.面等要素直接导出为CAD格式.如果要连带将ArcGIS中的文字标注导出为CAD格式要稍麻烦一点,下面是一个例子. ...

  3. 用IFeatureWorkspaceAnno.CreateAnnotationClass 创建注记图层时报“The application is not licensed to modify or create schema”的错误的解决方案。

    用IFeatureWorkspaceAnno.CreateAnnotationClass 的方法创建注记图层的时候报"The application is not licensed to m ...

  4. arcgis10.2 打开CAD文件注记乱码

    1.使用ARCGIS10.2打开CAD文件,图面显示的注记内容为乱码,属性表中的注记内容正常2.同样的CAD文件在ARCGIS9.3中打开正常出现此情况影响历史数据使用,请求ESRI技术支持注:系统添 ...

  5. 【ESRI论坛6周年征文】ArcEngine注记(Anno/ Label/Element等)处理专题 -入门篇

    原发表于ESRI中国社区,转过来.我的社区帐号:jhlong http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=122097 ----------- ...

  6. ArcMap 标注、注记、图形文本

    标注.注记.图形文本 2016年8月10日10:29 ArcMap中怎样向地图添加文本,其中标注与注记是重点内容,此处对此进行总结. 参考链接: ①地图文本基本词汇: 什么是文本? ArcGIS 提供 ...

  7. WebGIS中自定义互联网地图局部注记的一种方案

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.    前言 实际项目中我们经常会遇到这样一种场景:地图底图可能是互 ...

  8. 【转】Revit二次开发——读取cad中的文字信息

    Revit读取cad的文字信息需要借助Teigha的开源dll,在程序中添加下图中红色框的dll文件的引用,其他的dll文件全部放在同一个文件夹中即可,运行的时候,会自动把这些dll文件全部复制到bi ...

  9. 【ArcEngine入门与提高】Element(元素)、Annotation(注记)旋转

    因项目需要,需要做一个旋转注记的工具.因为注记这玩意用的比较少,网上资源也很少,所以做起来相当头疼.在经过一番研究之后,终于搞清楚注记的存储原理了,原来是和Element的类似,只不过注记是要把Ele ...

随机推荐

  1. JavaScript实现禁用键盘和鼠标的点击事件

    编写自己定义的JavaScript函数maskingKeyboard()和rightKey(); maskingKeyboard():禁用键盘 rightKey():禁用鼠标右键 <script ...

  2. mybatis由浅入深day02_4多对多查询_多对多查询总结

    4 多对多查询 4.1 需求(查询用户及用户购买商品信息) 查询用户及用户购买商品信息. 4.2 sql语句 查询主表是:用户表 关联表:由于用户和商品没有直接关联,通过订单和订单明细进行关联,所以关 ...

  3. 超全面的JavaWeb笔记day10<Response&Request&路径&编码>

    1.Response 2.Request 3.路径 4.编码 请求响应流程图 response 1.response概述 response是Servlet.service方法的一个参数,类型为java ...

  4. Effective C++ Item 19 Treat class design as type design

    Too high class topic for me now ................... ................... ................... fill the ...

  5. 判断app是否是第一次启动

    如何判断app是否是第一启动呢,第一次启动的时候,加载引导页面等, 一下是我的解决方案: 1.在"AppDelegate.h"中找到- (BOOL)application:(UIA ...

  6. GIS-003-在线地图下载及应用

    目前在线地图有谷歌.高德.百度.Bing.soso.天地图.OpenStreet.ArcGIS Online等.在企业应用中,一般需要物理网络隔绝,就有必要下载地图数据之后模拟发布,可以选择下载谷歌影 ...

  7. org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed

    项目是使用activeMQ 发布订阅的模式,在本地测试正常,但是 放到服务器上出现这个错误: org.apache.activemq.transport.InactivityIOException: ...

  8. Linux命令之乐--grep

    正则表达式基本组成部分 Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 /* St ...

  9. N32903系列的基础知识(1)

    N32903U1DN使用ARM926EJ-S内核,其内部集成的JPEG编解码器.CMOS摄像头接口.32通道的声音处理单元(SPU).ADC.DAC等不仅可以满足各种的应用需求,还能减少生产方面的物料 ...

  10. vertical-align负值和margin-bottom负值的区别

    先看一下vertical-align在W3C当中的值有哪一些: 可是它有数值这一说确实很少提起,我们来看这么一段代码: <!DOCTYPE html> <html lang=&quo ...