xxsimHidePlot

PURPOSE ^

xxsimHidePlot - Set the hidden state of the specified plot to isHidden.

SYNOPSIS ^

function retval = xxsimHidePlot(window,plot,isHidden)

DESCRIPTION ^

 xxsimHidePlot - Set the hidden state of the specified plot to isHidden.

 Syntax: 
   retval = xxsimHidePlot(window,plot,isHidden)

 Inputs:
   window   = The ID or name of the plot window that contains the to be hidden or shown plot.
   plot     = The ID or name of the plot of which the isHidden state should be changed.
   isHidden = Boolean that indicates if the plot should be hidden (1) or shown (0).
 
 Outputs: 
   retval = returns true if the new hidden status of the plot is properly set, false otherwise.  

 See also: xxsimAddPlotToWindow, xxsimRemovePlotFromWindow, xxsimOpenSimulator, xxsimGetPlotsFromWindow

 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 = xxsimHidePlot(window,plot,isHidden)
0002 % xxsimHidePlot - Set the hidden state of the specified plot to isHidden.
0003 %
0004 % Syntax:
0005 %   retval = xxsimHidePlot(window,plot,isHidden)
0006 %
0007 % Inputs:
0008 %   window   = The ID or name of the plot window that contains the to be hidden or shown plot.
0009 %   plot     = The ID or name of the plot of which the isHidden state should be changed.
0010 %   isHidden = Boolean that indicates if the plot should be hidden (1) or shown (0).
0011 %
0012 % Outputs:
0013 %   retval = returns true if the new hidden status of the plot is properly set, false otherwise.
0014 %
0015 % See also: xxsimAddPlotToWindow, xxsimRemovePlotFromWindow, xxsimOpenSimulator, xxsimGetPlotsFromWindow
0016 %
0017 % Author: Controllab Products B.V.
0018 % email: info@controllab.nl
0019 % Website: http://www.controllab.nl
0020 % November 2015
0021 
0022 %------------- BEGIN CODE --------------
0023 
0024   % Check the obtained amount of input arguments.
0025   if(nargin>3)
0026     error('Too many input arguments were specified.');
0027   elseif(nargin<3)
0028     error('Too little input arguments were specified.');
0029   end;
0030   
0031   % Check if the window is an ID or name.
0032   if(~ischar(window) && ~isnumeric(window))
0033     error('Window is not a valid ID (number) or name (string).');
0034   end;
0035   
0036   % Check if the plot is an ID or name.
0037   if(~ischar(plot) && ~isnumeric(plot))
0038     error('Plot is not a valid ID (number) or name (string).');
0039   end;
0040 
0041   % Check if the isHidden input argument is a boolean.
0042   if(~islogical(isHidden))
0043     error('isHidden is not a boolean.');
0044   end;
0045 
0046   % Get the IDs from the names, if the input arguments were not already IDs
0047   windowID = xxsimGetPlotWindowIDFromName(window);
0048   plotID = xxsimGetPlotIDFromName(window,plot);
0049   
0050   % Make the call to 20-sim
0051     retval = xrlinvoke('xxsim.plot.hidePlot',struct('windowID',int32(windowID),'plotID',int32(plotID),'isHidden',isHidden));
0052 end
0053 %------------- END OF CODE --------------

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