xxsimRemovePlotWindow

PURPOSE ^

xxsimRemovePlotWindow - Remove a plot window from the simulator

SYNOPSIS ^

function retval = xxsimRemovePlotWindow(window)

DESCRIPTION ^

 xxsimRemovePlotWindow - Remove a plot window from the simulator

 Syntax: 
   retval = xxsimRemovePlotWindow(window)

 Inputs:
   window   = The ID or name corresponding to the plot window that will be removed.

 Outputs: 
   retval = returns true if the plot window is removed from the simulator without error and false otherwise.
 
 Example:
   retval = xxsimRemovePlotWindow(2)
   
     - Remove plot window with ID 2.
     - The number 2 can be replaced by the name of the plot window.
     - retval is true if the plot window with ID 2 is removed without errors, false otherwise
     - Note: The simulator should be open before calling this function.  

 See also: xxsimAddPlotWindow, xxsimOpenSimulator, xxsimGetPlotWindows

 Author: Controllab Products B.V.
 email: info@controllab.nl
 Website: http://www.controllab.nl
 November 2015

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function retval = xxsimRemovePlotWindow(window)
0002 % xxsimRemovePlotWindow - Remove a plot window from the simulator
0003 %
0004 % Syntax:
0005 %   retval = xxsimRemovePlotWindow(window)
0006 %
0007 % Inputs:
0008 %   window   = The ID or name corresponding to the plot window that will be removed.
0009 %
0010 % Outputs:
0011 %   retval = returns true if the plot window is removed from the simulator without error and false otherwise.
0012 %
0013 % Example:
0014 %   retval = xxsimRemovePlotWindow(2)
0015 %
0016 %     - Remove plot window with ID 2.
0017 %     - The number 2 can be replaced by the name of the plot window.
0018 %     - retval is true if the plot window with ID 2 is removed without errors, false otherwise
0019 %     - Note: The simulator should be open before calling this function.
0020 %
0021 % See also: xxsimAddPlotWindow, xxsimOpenSimulator, xxsimGetPlotWindows
0022 %
0023 % Author: Controllab Products B.V.
0024 % email: info@controllab.nl
0025 % Website: http://www.controllab.nl
0026 % November 2015
0027 
0028 %------------- BEGIN CODE --------------
0029 
0030   % Check the obtained amount of input arguments.
0031   if(nargin>1)
0032     error('Too many input arguments were specified.');
0033   elseif(nargin==0)
0034     error('Please specify the window ID.');
0035   endif;
0036   
0037   % Check if the input is a string
0038   if(!isnumeric(window) && !ischar(window))
0039     error('Please specify a number as ID or a string as name for the plot window.');
0040   endif;
0041   
0042   windowID = xxsimGetPlotWindowIDFromName(window);
0043 
0044   % and make the actual call to 20-sim
0045   retval = xrlinvoke('xxsim.plot.removePlotWindow',struct('windowID',int32(windowID)));
0046 
0047 end
0048 %------------- END OF CODE --------------

Generated on Sun 10-Dec-2017 19:24:51