Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ezdxf
#1
Hi,
How can I create window (using tkinter) with .dxf file inside this window?

Something like:
" import ezdxf
from tkinter import *

aaa = "E:\dxf_test\dxf_test\dxf_test1.dxf"
doc = ezdxf.readfile(aaa)

window = Tk()
my_img1 = PhotoImage(file=doc)
my_label = Label(window, image=my_img1).pack()"

Is it possible to open directly .dxf image in tkinter's window or I must convert it to .png/.jpg or how can I do this?
Reply
#2
first convert to png file using drawing using drawing to convert dxf to png
then make a label using pil or pillow here's an example: label with image using PIL
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020