简体   繁体   中英

How to add a tagging or label(the same thing in a cad file) through ezdxf or dxfwrite of python?

I want to born a file which can be open by CAD software.

I choose the library named 'ezdxf'.

I get trouble when I want to add a label(or tagging, I mean,the function provide by CAD software to show the begin and end point of a line segment).

I had tried to read the documents of the 'ezdxf',but did not found anything about the label or tagging(en,with my poor English and the Google translation).

So, the question:

If I want to born a file like 'XXX.dxf',which library of python has more function(s) and provide the function above ---- add a label or tagging?

Create a new Drawing with ezdxf :

import ezdxf
drawing = ezdxf.new(dxfversion='AC1009')

Supported DXF versions:

  • AC1009 AutoCAD R12
  • AC1015 AutoCAD R2000
  • AC1018 AutoCAD R2004
  • AC1021 AutoCAD R2007
  • AC1024 AutoCAD R2010
  • AC1027 AutoCAD R2013
  • AC1032 AutoCAD R2018

The title of dxfwrite at github is:

Outdated DXF R12 writer, please switch to ezdxf

There exists no library which provides exact what you need, ezdxf is just an interface to the DXF format not a CAD application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM