xxsimGotoSubmodel

PURPOSE ^

xxsimGotoSubmodel - Select the provided submodel in the tree and show its contents

SYNOPSIS ^

function [result] = xxsimGotoSubmodel(varargin)

DESCRIPTION ^

 xxsimGotoSubmodel - Select the provided submodel in the tree and show its contents

 Syntax:
   result = xxsimGotoSubmodel(submodelName)

 Inputs:
   submodelName = the hierachical submodel name

 Outputs:
   result = boolean indicating the success.

 Examples:
   result = xxsimGotoSubmodel('mysubmodel')

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [result] = xxsimGotoSubmodel(varargin)
0002 % xxsimGotoSubmodel - Select the provided submodel in the tree and show its contents
0003 %
0004 % Syntax:
0005 %   result = xxsimGotoSubmodel(submodelName)
0006 %
0007 % Inputs:
0008 %   submodelName = the hierachical submodel name
0009 %
0010 % Outputs:
0011 %   result = boolean indicating the success.
0012 %
0013 % Examples:
0014 %   result = xxsimGotoSubmodel('mysubmodel')
0015 %
0016 % Author: Controllab Products B.V.
0017 % email: info@controllab.nl
0018 % Website: http://www.controllab.nl
0019 % May 2016
0020 
0021 %------------- BEGIN CODE --------------
0022     %check input arguments
0023     if length(varargin)==1
0024         if ~ischar(varargin{1})
0025             error('Input argument 1 should be the name of the submodel (string).');
0026         else
0027             submodelName = varargin{1};
0028         end
0029     else
0030         error('This function expects 1 input argument: submodelName.');
0031     end
0032 
0033     reply = xrlinvoke('xxsim.gui.gotoSubmodel', struct('submodelName', submodelName));
0034     if (isempty(reply) )
0035         error('could not find or select the submodel');
0036     end
0037 
0038     % return the succes
0039     result = true;
0040 end
0041 %------------- END OF CODE --------------

Generated on Thu 25-Apr-2024 10:30:24