diff m-toolbox/classes/@LTPDAworkbench/newPipeline.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/@LTPDAworkbench/newPipeline.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,24 @@
+% NEWPIPELINE creates a new pipeline document in the current workbench.
+%
+% CALL:   wb.newPipeline(name)
+%         wb.newPipeline(objs)
+%
+% M Hewitson 11-10-08
+%
+% $Id: newPipeline.m,v 1.2 2010/08/06 19:10:49 ingo Exp $
+%
+function newPipeline(wb, varargin)
+  
+  if ischar(varargin{1})
+    awtinvoke(wb.mp, 'createNewBlockDiagram', varargin{1});
+  else
+    % Collect input variable names
+    in_names = cell(size(varargin));
+    for ii = 1:nargin,in_names{ii} = inputname(ii);end
+    % Collect all AOs and plists
+    objs = utils.helper.collect_objects(varargin(:), 'ltpda_uoh', in_names);
+    % build pipeline on the active document
+    wb.objs2pipeline(objs);
+  end
+  
+end