xxsimHideCurve

PURPOSE ^

xxsimHideCurve - Set the hidden state of the specified curve to isHidden.

SYNOPSIS ^

function retval = xxsimHideCurve(window,plot,curve,isHidden)

DESCRIPTION ^

 xxsimHideCurve - Set the hidden state of the specified curve to isHidden.

 Syntax: 
   retval = xxsimHideCurve(window,plot,curve,isHidden)

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

 See also: xxsimAddCurveToPlot, xxsimRemoveCurveFromPlot, xxsimOpenSimulator, xxsimGetCurvesFromPlot

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

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