xxsimGetActiveModel - returns name and unique identifier of active model. Note: an active 20-sim editor with no saved model returns an empty string as name. Syntax: [name, identifier] = xxsimGetActiveModel() name = xxsimGetActiveModel() Inputs: takes no arguments. Outputs: name = name of the active model. identifier = unique identifier of active model. Examples: [name,identifier] = xxsimGetActiveModel(); - Returns the name and identifier of the currently active model. See also: xxsimOpenModel, xxsimCloseModel, xxsimSetActiveModel
0001 function [name, identifier] = xxsimGetActiveModel() 0002 % xxsimGetActiveModel - returns name and unique identifier of active model. 0003 % Note: an active 20-sim editor with no saved model returns an empty string as name. 0004 % 0005 % Syntax: 0006 % [name, identifier] = xxsimGetActiveModel() 0007 % name = xxsimGetActiveModel() 0008 % 0009 % Inputs: 0010 % takes no arguments. 0011 % 0012 % Outputs: 0013 % name = name of the active model. 0014 % identifier = unique identifier of active model. 0015 % 0016 % Examples: 0017 % [name,identifier] = xxsimGetActiveModel(); 0018 % - Returns the name and identifier of the currently active model. 0019 % See also: xxsimOpenModel, xxsimCloseModel, xxsimSetActiveModel 0020 0021 % Author: Controllab Products B.V. 0022 % email: info@controllab.nl 0023 % Website: http://www.controllab.nl 0024 % November 2015 0025 0026 %------------- BEGIN CODE -------------- 0027 0028 if(nargin>0) 0029 error('Too many input arguments: xxsimGetActiveModel does not expect any input arguments.'); 0030 end; 0031 0032 % call the interface function 0033 reply = xrlinvoke('xxsim.getActiveModel'); 0034 0035 % return the identifier 0036 identifier = reply.identifier; 0037 name = reply.name; 0038 end 0039 %------------- END OF CODE --------------