xxsimNewModel - Opens a new 20-sim model. sets the opened model/editor as active model and assigns unique identifier. Syntax: retval = xxsimNewModel() Inputs: takes no arguments. Outputs: retval = returns true if a new model is opened, false otherwise. Examples: retval = xxsimNewModel() Opens a new 20-sim model, and returns true if a new model is opened, and false otherwise. See also: xxsimOpenModel Author: Controllab Products B.V. email: info@controllab.nl Website: http://www.controllab.nl November 2015
0001 function retval = xxsimNewModel() 0002 % xxsimNewModel - Opens a new 20-sim model. 0003 % sets the opened model/editor as active model and assigns unique identifier. 0004 % 0005 % Syntax: 0006 % retval = xxsimNewModel() 0007 % 0008 % Inputs: 0009 % takes no arguments. 0010 % 0011 % Outputs: 0012 % retval = returns true if a new model is opened, false otherwise. 0013 % 0014 % Examples: 0015 % retval = xxsimNewModel() 0016 % Opens a new 20-sim model, and returns true if a new model is opened, and false otherwise. 0017 % 0018 % See also: xxsimOpenModel 0019 % 0020 % Author: Controllab Products B.V. 0021 % email: info@controllab.nl 0022 % Website: http://www.controllab.nl 0023 % November 2015 0024 0025 %------------- BEGIN CODE -------------- 0026 0027 if(nargin>0) 0028 error('Too many input arguments: xxsimNewModel does not expect any input arguments.'); 0029 end; 0030 0031 % reuse the open model functionality 0032 identifier = xxsimOpenModel('', true); 0033 if identifier == 0 0034 retval = false; 0035 else 0036 retval = true; 0037 end 0038 0039 end