这里都是高手,请教一个简单问题?(付款20元)
<p>foreach (dbx.AcadEntity Entity in _AxDbDocument.ModelSpace)<br/> {<br/> <br/> switch (Entity.EntityName)<br/> {<br/> case "AcDbPoint":<br/> dbx.AcadPoint ePoint =( dbx.AcadPoint) Entity;<br/> break;<br/> case "AcDbMText":<br/> dbx.AcadMText eMText = (dbx.AcadMText)Entity;<br/> break;<br/> case "AcDbText":<br/> dbx.AcadText eText = (dbx.AcadText)Entity;<br/> break;<br/> case "AcDbLine":<br/> dbx.AcadLine eLine = (dbx.AcadLine)Entity;<br/> break;<br/> case "AcDbSpline":<br/> dbx.AcadSpline eSpline = (dbx.AcadSpline)Entity;<br/> break;<br/> case "AcDbPolyline":<br/> dbx.AcadLWPolyline eLPolyline = (dbx.AcadLWPolyline)Entity;<br/> break;<br/> case "AcDb2dPolyline":<br/> ?????????????????????????????????????????????????<br/> break;<br/> case "AcDb3dPolyline":<br/> dbx.Acad3DPolyline ePolyline = (dbx.Acad3DPolyline)Entity;<br/> break;<br/> case "AcDbArc":<br/> dbx.AcadArc eArc = (dbx.AcadArc)Entity;<br/> break;<br/> case "AcDbCircle":<br/> dbx.AcadCircle eCircle = (dbx.AcadCircle)Entity;<br/> break;<br/> case "AcDbEllipse":<br/> dbx.AcadEllipse eEllipse = (dbx.AcadEllipse)Entity;<br/> break;<br/> case "AcDbBlockReference":<br/> dbx.AcadBlockReference eBlockReference = (dbx.AcadBlockReference)Entity;<br/> break;<br/> default:<br/> <br/> break;<br/> }<br/> }</p><p>上面代码中如果是直线类,这可以转换成dbx.AcadLine eLine = (dbx.AcadLine)Entity;但<br/>AcDb2dPolyline中对应的类不知道该转换成那个类?请大家帮助??</p> AcadLWPolyline <br/> AcadPolyline
页:
[1]