


xxsimOpenProcessedModel - opens a processed model for the current active model.
Syntax:
result = xxsimOpenProcessedModel(fileName)
Inputs:
fileName = directory path to which the processed model should be opened .
Outputs:
result = boolean indicating the success.
Examples:
result = xxsimOpenProcessedModel("C:\\temp\\test.emp")
- saves the current model to the file 'test.emp'
See also: xxsimOpenModel, xxsimCloseModel, xxsimSaveSubmodel
Author: Controllab Products B.V.
email: info@controllab.nl
Website: http://www.controllab.nl
September 2023
------------- BEGIN CODE --------------
check input arguments

0001 function [result] = xxsimOpenProcessedModel(varargin) 0002 % xxsimOpenProcessedModel - opens a processed model for the current active model. 0003 % 0004 % Syntax: 0005 % result = xxsimOpenProcessedModel(fileName) 0006 % 0007 % Inputs: 0008 % fileName = directory path to which the processed model should be opened . 0009 % 0010 % Outputs: 0011 % result = boolean indicating the success. 0012 % 0013 % Examples: 0014 % result = xxsimOpenProcessedModel("C:\\temp\\test.emp") 0015 % 0016 % - saves the current model to the file 'test.emp' 0017 % 0018 % See also: xxsimOpenModel, xxsimCloseModel, xxsimSaveSubmodel 0019 % 0020 % Author: Controllab Products B.V. 0021 % email: info@controllab.nl 0022 % Website: http://www.controllab.nl 0023 % September 2023 0024 %------------- BEGIN CODE -------------- 0025 %check input arguments 0026 modelFilename = ''; 0027 if length(varargin)==1 0028 0029 if ~ischar(varargin{1}) 0030 error('Input argument 1 should be a file name.'); 0031 else 0032 modelFilename = varargin{1}; 0033 end 0034 elseif length(varargin) > 1 0035 error('This function expects only 1 (optional) input argument.'); 0036 end 0037 0038 % set the result varaible 0039 result = true; 0040 0041 reply = xrlinvoke('xxsim.openProcessedModel', struct('name', modelFilename)); 0042 if (isempty(reply) ) 0043 error('could not open the processed model'); 0044 end 0045 0046 % return the succes 0047 result = true; 0048 end 0049 %------------- END OF CODE --------------