Clearing, or removing, items

Legacy scripting supports various uses of the clear command, for example:

  • clear outputs To delete all output items from the manager palette.
  • clear generated palette To clear all model nuggets from the Models palette.
  • clear stream To remove the contents of a stream.

Python scripting supports a similar set of functions; the removeAll() command is used to clear the Streams, Outputs, and Models managers For example:

  • To clear the Streams manager:
    session = modeler.script.session()
    session.getStreamManager.removeAll()
  • To clear the Outputs manager:
    session = modeler.script.session()
    session.getDocumentOutputManager().removeAll()
  • To clear the Models manager:
    session = modeler.script.session()
    session.getModelOutputManager().removeAll()