高星星_9527 2022-01-08 09:23 采纳率: 29.2%
浏览 347
已结题

netDXF读写dxf文件

在vb.net里读写.dxf文件,最好有例程测试给的,并或去圆弧,直线,多断线,文本以及其他坐标详细

  • 写回答

2条回答 默认 最新

  • 急速光粒 2022-01-08 19:29
    关注

    问题是什么呢?例子挺简单的,有源代码和二次开发文档可以用。支持的类型也很全,3dFace
    Arc(圆弧)Circle Dimensions 、Ellipse、Hatch 、Image、Insert 、Leader、Line(直线)、LwPolyline 、Mesh
    MLine、MText、Point、PolyfaceMesh、Polyline(多段线)、Ray、Shape、Solid、Spline、Text(文本)
    Tolerance、Trace、Underlay (DGN, DWF, and PDF underlays)
    Wipeout
    XLine (aka construction line)

    
    
        // create a new document, by default it will create an AutoCad2000 DXF version
        DxfDocument doc = new DxfDocument();
        // an entity
        Line entity = new Line(new Vector2(5, 5), new Vector2(10, 5));
        // add your entities here
        doc.Entities.Add(entity);
        // save to file
        doc.Save(file);
    
        // this check is optional but recommended before loading a DXF file
        DxfVersion dxfVersion = DxfDocument.CheckDxfFileVersion(file);
        // netDxf is only compatible with AutoCad2000 and higher DXF versions
        if (dxfVersion < DxfVersion.AutoCad2000) return;
        // load file
        DxfDocument loaded = DxfDocument.Load(file);
    
    评论 编辑记录

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 1月10日
  • 创建了问题 1月8日