- multiple fixes in the Tcl commands (especially regarding the interchange between True/false and 1/0 values)

- updated the help for all Tcl Commands
- in Tcl Shell, the 'help' command will add also a brief description for each command in the list
This commit is contained in:
Marius Stanciu
2020-04-13 19:15:20 +03:00
committed by Marius
parent 5dcddb168e
commit 8a299e8fc8
66 changed files with 350 additions and 172 deletions

View File

@@ -14,9 +14,11 @@ class TclCommandExportGerber(TclCommand):
# List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
aliases = ['export_grb', 'egr', 'export_gerber']
description = '%s %s' % ("--", "Export a Gerber object as a Gerber File.")
# Dictionary of types from Tcl command, needs to be ordered
arg_names = collections.OrderedDict([
('obj_name', str),
('name', str),
('filename', str)
])
@@ -31,8 +33,9 @@ class TclCommandExportGerber(TclCommand):
help = {
'main': "Export a Gerber Object as a Gerber File.",
'args': collections.OrderedDict([
('obj_name', 'Name of the object to export. Required.'),
('filename', 'Path to the file to export.')
('name', 'Name of the object to export. Required.'),
('filename', 'Absolute path to file to export.\n'
'WARNING: no spaces are allowed. If unsure enclose the entire path with quotes.'),
]),
'examples': ['export_gerber my_gerber path/my_file.gbr']
}
@@ -44,6 +47,6 @@ class TclCommandExportGerber(TclCommand):
:param unnamed_args:
:return:
"""
if 'filename' not in args:
args['filename'] = self.app.defaults["global_last_save_folder"] + '/' + args['obj_name']
if 'filename' not in args:
args['filename'] = self.app.defaults["global_last_save_folder"] + '/' + args['name']
self.app.export_gerber(use_thread=False,**args)