TclCommandPlotAll.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from tclCommands.TclCommand import TclCommand
  2. import collections
  3. class TclCommandPlotAll(TclCommand):
  4. """
  5. Tcl shell command to update the plot on the user interface.
  6. example:
  7. plot
  8. """
  9. # List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
  10. aliases = ['plot_all']
  11. description = '%s %s' % ("--", "Plots all objects on GUI.")
  12. # Dictionary of types from Tcl command, needs to be ordered
  13. arg_names = collections.OrderedDict([
  14. ])
  15. # Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
  16. option_types = collections.OrderedDict([
  17. ])
  18. # array of mandatory options for current Tcl command: required = {'name','outname'}
  19. required = []
  20. # structured help for current command, args needs to be ordered
  21. help = {
  22. 'main': "Plots all objects on GUI.",
  23. 'args': collections.OrderedDict([
  24. ]),
  25. 'examples': ['plot_all']
  26. }
  27. def execute(self, args, unnamed_args):
  28. """
  29. :param args:
  30. :param unnamed_args:
  31. :return:
  32. """
  33. if self.app.cmd_line_headless != 1:
  34. self.app.plot_all()