File: setup_all_dxf_versions.py

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (15 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#  Copyright (c) 2022, Manfred Moitzi
#  License: MIT License
import pathlib
import ezdxf

CWD = pathlib.Path("~/Desktop/Outbox").expanduser()
if not CWD.exists():
    CWD = pathlib.Path(".")

for version in ["R12", "R2000", "R2004", "R2007", "R2010", "R2013", "R2018"]:
    doc = ezdxf.new(dxfversion=version, setup=True)
    msp = doc.modelspace()

    msp.add_line((0, 0), (10, 10))
    doc.saveas(CWD / f"setup_{version}.dxf")