xxsimGetCurvesFromPlot

PURPOSE ^

xxsimGetCurvesFromPlot - Get all currently available curves that are present in the specified plot by both name and ID.

SYNOPSIS ^

function retval = xxsimGetCurvesFromPlot(window,plot)

DESCRIPTION ^

 xxsimGetCurvesFromPlot - Get all currently available curves that are present in the specified plot by both name and ID.

 Syntax: 
   retval = xxsimGetCurvesFromPlot(window,plot)

 Inputs:
   window   = The ID or name of the plot window from which the curves should be shown.
   plot     = The ID or name of the plot from which the curves should be shown.
 
 Outputs: 
   retval = returns a structure array in which each element has a structure with a plotID member.
            the return struct also has members for the x-axis and y-axis, and for if the curve is hidden or not.
 
 Example:
   retval = xxsimGetCurvesFromPlot(2,1)
   
     - retval now contains the list of curve names and curve IDs for the plot with ID 1 in plot window with ID 2.
     - the 2 could be replaced by the name of the plot window.
     - the 1 could be replaced by the name of the plot.
     - the output is returned in a structure array form. 
       e.g
         retval.curveID       : returns the ID of the curve
         retval.xPath         : returns the path of the variable plotted on the x-axis of the curve.
         retval.yPath         : returns the path of the variable plotted on the y-axis of the curve.
         retval.isHidden      : returns a boolean that indicates if the curve is hidden (true) or not (false).
     - Note: The simulator should be open before calling this function.  

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

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