Python Forum

Full Version: ezdxf
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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