- added an automatic name on each save operation based on the object name and/or the current date

- added more information's for the statistics
This commit is contained in:
Marius Stanciu
2019-02-03 23:08:09 +02:00
committed by Marius S
parent 5e55f0d499
commit e1888b1647
15 changed files with 192 additions and 35 deletions

View File

@@ -4126,6 +4126,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
self.app.report_usage("cncjob_on_exportgcode_button")
self.read_form()
name = self.app.collection.get_active().options['name']
if 'Roland' in self.pp_excellon_name or 'Roland' in self.pp_geometry_name:
_filter_ = "RML1 Files (*.rol);;" \
@@ -4136,12 +4137,20 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
else:
_filter_ = "G-Code Files (*.nc);;G-Code Files (*.txt);;G-Code Files (*.tap);;G-Code Files (*.cnc);;" \
"G-Code Files (*.g-code);;All Files (*.*)"
try:
filename = str(QtWidgets.QFileDialog.getSaveFileName(
caption="Export Machine Code ...", directory=self.app.get_last_save_folder(), filter=_filter_)[0])
caption="Export Machine Code ...",
directory=self.app.get_last_save_folder() + '/' + name,
filter=_filter_
)[0])
except TypeError:
filename = str(QtWidgets.QFileDialog.getSaveFileName(caption="Export Machine Code ...", filter=_filter_)[0])
if filename == '':
self.app.inform.emit("[WARNING_NOTCL]Export Machine Code cancelled ...")
return
preamble = str(self.ui.prepend_text.get_value())
postamble = str(self.ui.append_text.get_value())