xxsimGetPlotsFromWindow

PURPOSE ^

xxsimGetPlotsFromWindow - Get all currently available plots that are present in the specified window by both name and ID.

SYNOPSIS ^

function retval = xxsimGetPlotsFromWindow(window)

DESCRIPTION ^

 xxsimGetPlotsFromWindow - Get all currently available plots that are present in the specified window by both name and ID.

 Syntax: 
   retval = xxsimGetPlotsFromWindow(window)

 Inputs:
   window   = The ID or name of the plot window for which the plots should be returned.
 
 Outputs: 
   retval = returns a structure array in which each element has a structure with a plotName and corresponding plotID member.
 
 Examples:
   retval = xxsimGetPlotsFromWindow(2)
   
     - retval now contains the list of plot names and plot IDs for the window with ID 2.
     - the 2 could be replaced by the name of the plot window.
     - the output is returned in a structure array form. 
       e.g
         retval.plotName     : returns the name of the plot.
         retval.plotID       : returns the ID of the plot.
     - Note: The simulator should be open before calling this function.  

 See also: 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 = xxsimGetPlotsFromWindow(window)
0002 % xxsimGetPlotsFromWindow - Get all currently available plots that are present in the specified window by both name and ID.
0003 %
0004 % Syntax:
0005 %   retval = xxsimGetPlotsFromWindow(window)
0006 %
0007 % Inputs:
0008 %   window   = The ID or name of the plot window for which the plots should be returned.
0009 %
0010 % Outputs:
0011 %   retval = returns a structure array in which each element has a structure with a plotName and corresponding plotID member.
0012 %
0013 % Examples:
0014 %   retval = xxsimGetPlotsFromWindow(2)
0015 %
0016 %     - retval now contains the list of plot names and plot IDs for the window with ID 2.
0017 %     - the 2 could be replaced by the name of the plot window.
0018 %     - the output is returned in a structure array form.
0019 %       e.g
0020 %         retval.plotName     : returns the name of the plot.
0021 %         retval.plotID       : returns the ID of the plot.
0022 %     - Note: The simulator should be open before calling this function.
0023 %
0024 % See also: xxsimOpenSimulator, xxsimGetPlotWindows
0025 %
0026 % Author: Controllab Products B.V.
0027 % email: info@controllab.nl
0028 % Website: http://www.controllab.nl
0029 % November 2015
0030 
0031 %------------- BEGIN CODE --------------
0032 
0033   % Check the obtained amount of input arguments.
0034   if(nargin>1)
0035     error('Too many input arguments were specified.');
0036   elseif(nargin<1)
0037     error('Too little input arguments were specified.');
0038   end;
0039   
0040   % Get the window ID.
0041   windowID = xxsimGetPlotWindowIDFromName(window);
0042   if(windowID == 0)
0043     error('The specified plot window is invalid.');
0044   end;
0045 
0046   % Do the actual call to 20-sim.
0047   retval = xrlinvoke('xxsim.plot.getPlotsFromWindow',struct('windowID',int32(windowID)));
0048 end
0049 %------------- END OF CODE --------------

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