明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3822|回复: 2

这里都是高手,请教一个简单问题?(付款20元)

[复制链接]
发表于 2008-1-28 17:57:00 | 显示全部楼层 |阅读模式

foreach (dbx.AcadEntity Entity in _AxDbDocument.ModelSpace)
             {
              
                  switch (Entity.EntityName)
                     {
                         case "AcDbPoint":
                              dbx.AcadPoint ePoint =( dbx.AcadPoint) Entity;
                             break;
                         case "AcDbMText":
                               dbx.AcadMText eMText = (dbx.AcadMText)Entity;
                             break;
                         case "AcDbText":
                                dbx.AcadText eText = (dbx.AcadText)Entity;
                             break;
                         case "AcDbLine":
                               dbx.AcadLine eLine = (dbx.AcadLine)Entity;
                             break;
                         case "AcDbSpline":
                             dbx.AcadSpline eSpline = (dbx.AcadSpline)Entity;
                             break;
                         case "AcDbPolyline":
                               dbx.AcadLWPolyline eLPolyline = (dbx.AcadLWPolyline)Entity;
                             break;
                         case "AcDb2dPolyline":
                              ?????????????????????????????????????????????????
                             break;
                         case "AcDb3dPolyline":
                             dbx.Acad3DPolyline ePolyline = (dbx.Acad3DPolyline)Entity;
                             break;
                         case "AcDbArc":
                             dbx.AcadArc eArc = (dbx.AcadArc)Entity;
                             break;
                         case "AcDbCircle":
                              dbx.AcadCircle eCircle = (dbx.AcadCircle)Entity;
                             break;
                         case "AcDbEllipse":
                              dbx.AcadEllipse eEllipse = (dbx.AcadEllipse)Entity;
                             break;
                         case "AcDbBlockReference":
                            dbx.AcadBlockReference eBlockReference = (dbx.AcadBlockReference)Entity;
                             break;
                         default:
                            
                             break;
                     }
                 }

上面代码中如果是直线类,这可以转换成dbx.AcadLine eLine = (dbx.AcadLine)Entity;但
AcDb2dPolyline中对应的类不知道该转换成那个类?请大家帮助??

发表于 2008-6-12 19:56:00 | 显示全部楼层
AcadLWPolyline   
发表于 2008-6-12 19:58:00 | 显示全部楼层
AcadPolyline 
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-18 10:38 , Processed in 0.186484 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表