//获取文件的全部字
public static List<CadText> GetCadText(string path)
{
return ((Aspose.CAD.FileFormats.Cad.CadImage)Image.Load(path))
.Entities
.Where(x => x.TypeName == CadEntityTypeName.TEXT)
.Select(x => (CadText)x)
.ToList();
}
//获取文件的全部线
public static List<Cad2DPoint> GetLwCadLinePoint(string path)
{
var entitys = ((Aspose.CAD.FileFormats.Cad.CadImage)Image.Load(path))
.Entities;
var lwPoints = entitys.Where(x => x.TypeName == CadEntityTypeName.LWPOLYLINE)
.Select(x => (CadLwPolyline)x)
.SelectMany(x => x.Coordinates.ToArray())
.ToList();
var lines = entitys.Where(x => x.TypeName == CadEntityTypeName.LINE)
.Select(x => (ICadLine)x)
.ToList();
lwPoints.A
cad解析_笔记
最新推荐文章于 2023-09-26 11:53:40 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)