G-Code Generator
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7330
- Thank you received: 1177
26 Aug 2015 18:55 #61807
by BigJohnT
Did you following the guidelines from here?
linuxcnc.org/index.php/english/forum/36-...-this-before-posting
JT
Replied by BigJohnT on topic G-Code Generator
I can't get it to attach ???
Did you following the guidelines from here?
linuxcnc.org/index.php/english/forum/36-...-this-before-posting
JT
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7330
- Thank you received: 1177
26 Aug 2015 19:00 #61808
by BigJohnT
Replied by BigJohnT on topic G-Code Generator
Can you split out the code lines in question? There are no line numbers in Kunena.
JT
JT
Please Log in or Create an account to join the conversation.
- mmt
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 2
26 Aug 2015 22:38 - 26 Aug 2015 22:40 #61811
by mmt
Replied by mmt on topic G-Code Generator
I wasn't aware of the limits on file formats.
Here are the lines of code and I will also attempt to attach it here.
thanks again
# Create Buttons
self.DoItButton = Button(self.EntryFrame, text='Recalculate', command=self.DoIt)
self.DoItButton.grid(row=12, column=4)
self.SendToAxis = Button(self.EntryFrame, text='Send To Axis', command=self.SendButton)
self.SendToAxis.grid(row=12, column=5)
if IN_AXIS:
self.quitButton = Button(self, text='Write to AXIS and Quit', command=self.WriteToAxis)
else:
self.quitButton = Button(self, text='Quit', command=self.quit)
self.quitButton.grid(row=16, column=1)
self.quit()
def CopyClipboard(self):
self.clipboard_clear()
for line in self.gcode:
self.clipboard_append(line + '\n')
def SendButton(self, obj, data=None):
for line in self.gcode:
sys.stdout.write(line + '\n')
os.system("temp.ngc")
def WriteToAxis(self):
for line in self.gcode:
sys.stdout.write(line + '\n')
self.quit()
def DoIt(self):
for seg in self.segID:
self.PreviewCanvas.delete(seg)
self.segID = []
self.gcode = []
Here are the lines of code and I will also attempt to attach it here.
thanks again
# Create Buttons
self.DoItButton = Button(self.EntryFrame, text='Recalculate', command=self.DoIt)
self.DoItButton.grid(row=12, column=4)
self.SendToAxis = Button(self.EntryFrame, text='Send To Axis', command=self.SendButton)
self.SendToAxis.grid(row=12, column=5)
if IN_AXIS:
self.quitButton = Button(self, text='Write to AXIS and Quit', command=self.WriteToAxis)
else:
self.quitButton = Button(self, text='Quit', command=self.quit)
self.quitButton.grid(row=16, column=1)
self.quit()
def CopyClipboard(self):
self.clipboard_clear()
for line in self.gcode:
self.clipboard_append(line + '\n')
def SendButton(self, obj, data=None):
for line in self.gcode:
sys.stdout.write(line + '\n')
os.system("temp.ngc")
def WriteToAxis(self):
for line in self.gcode:
sys.stdout.write(line + '\n')
self.quit()
def DoIt(self):
for seg in self.segID:
self.PreviewCanvas.delete(seg)
self.segID = []
self.gcode = []
Last edit: 26 Aug 2015 22:40 by mmt.
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7330
- Thank you received: 1177
27 Aug 2015 00:11 #61815
by BigJohnT
Replied by BigJohnT on topic G-Code Generator
The Tkinter self.quit() is what exits the program.
You should be using Gtk and Glade IMHO.
JT
You should be using Gtk and Glade IMHO.
JT
Please Log in or Create an account to join the conversation.
- mmt
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 2
01 Sep 2015 04:35 #61958
by mmt
Replied by mmt on topic G-Code Generator
Can it be done with Tkinter ?
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7330
- Thank you received: 1177
01 Sep 2015 04:51 - 01 Sep 2015 04:56 #61959
by BigJohnT
JT
Replied by BigJohnT on topic G-Code Generator
What is "it"?Can it be done with Tkinter ?
JT
Last edit: 01 Sep 2015 04:56 by BigJohnT.
Please Log in or Create an account to join the conversation.
- mmt
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 2
01 Sep 2015 05:19 #61960
by mmt
Replied by mmt on topic G-Code Generator
send the file to axis and have the gui remain open ?
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7330
- Thank you received: 1177
01 Sep 2015 05:24 #61961
by BigJohnT
Remove the self.quit() if you don't want the program to quit.
JT
Replied by BigJohnT on topic G-Code Generator
send the file to axis and have the gui remain open ?
The Tkinter self.quit() is what exits the program.
Remove the self.quit() if you don't want the program to quit.
JT
Please Log in or Create an account to join the conversation.
- mmt
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 2
01 Sep 2015 21:17 - 01 Sep 2015 21:17 #62000
by mmt
Replied by mmt on topic G-Code Generator
Thanks John but that doesn't work. Any other suggestions?
Last edit: 01 Sep 2015 21:17 by mmt.
Please Log in or Create an account to join the conversation.
Time to create page: 0.061 seconds