0

I don't get the outer dimensions from the DXF.

import ezdxf as ez
import sys

doc = ez.readfile("T12706456-0.dxf")
msp = doc.modelspace()


# helper function
def print_entity(e):
    print("LINE on layer: %s\n" % e.dxf.layer)
    print("start point: %s\n" % e.dxf.start)
    print("end point: %s\n" % e.dxf.end)

# iterate over all entities in modelspace
msp = doc.modelspace()
for e in msp:
    if e.dxftype() == "LINE":
        print_entity(e)

# entity query for all LINE entities in modelspace
for e in msp.query("LINE"): 
    print_entity(e)

I don't get the outer dimensions from the DXF. I want if the DXF is in 'portrait' it will be converted to landscape. I also want to know the width and length of the DXF.

DeskDoc
  • 11
  • 1

0 Answers0