Thanks for reply.
Som nevnt er jeg ny til koding. For dette prosjektet har jeg i hovedsak brukt Sublime Text 3 og tkinter.
I do not have much. Just breadcrumbs that I have tried to put together, without success. I have tried different features but not found the right one. I know what I want the function to be.
I'm not looking for a conclusion. Just set in the right direction.
I add what I have, but I know it's wrong and it does not work.
Sincerely, Jan.
Som nevnt er jeg ny til koding. For dette prosjektet har jeg i hovedsak brukt Sublime Text 3 og tkinter.
I do not have much. Just breadcrumbs that I have tried to put together, without success. I have tried different features but not found the right one. I know what I want the function to be.
I'm not looking for a conclusion. Just set in the right direction.
I add what I have, but I know it's wrong and it does not work.
Sincerely, Jan.
# Importerer tkinter. Dette følger med, er innebygd i Python from tkinter import * from PIL import ImageTk,Image from tkinter import filedialog # Dette må stå først root = Tk() # Endre overskriften på boksen root.title("BIMBARIANS Autorun") root.iconbitmap('C:/Users/jan/Desktop/SolibriAutorun/Ikon/BIMBARIANS.ico') root.geometry("400x400") def button_open1(): global my_file root.filename = filedialog.askopenfilename(initialdir="C:/Users/jan/Desktop/SolibriAutorun", title="Select A File", filetypes=(("IFC files", "*.ifc"),("all files", "*.*"))) my_label = Label(root, text=root.filename).pack() #my_image = ImageTk.PhotoImage(Image.open(root.filename)) #my_image_label = Label(image=my_image).pack() button_1 = Button(root, text="Add IFC", padx=59, pady=20, command=button_open1) button_2 = Button(root, text="Add ruleset", padx=46, pady=20, command=open) button_3 = Button(root, text="Add classification", padx=33, pady=20, command=open) button_4 = Button(root, text="Run Solibri Autorun", padx=38, pady=20, command=open) button_1.grid(row=1, column=0) button_2.grid(row=2, column=0) button_3.grid(row=3, column=0) button_4.grid(row=4, column=0) mainloop() # Når man lukker vinduet, slutter man loopen
Larz60+ write Jan-22-2021, 05:08 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.