LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
jsimwView.m
1function jsimwView(filename)
2% JSIMWVIEW(FILENAME)
3% Open model in JSIMwiz
4
5% Copyright (c) 2012-2026, Imperial College London
6% All rights reserved.
7
8global LINEVerbose;
9
10[path] = fileparts(filename);
11if isempty(path)
12 filename=[pwd,filesep,filename];
13end
14
15% Check global verbosity level to determine output suppression
16suppressOutput = isempty(LINEVerbose) || LINEVerbose ~= VerboseLevel.DEBUG;
17
18if suppressOutput
19 % Suppress output unless in DEBUG mode
20 if ispc
21 cmd = ['java -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'" > nul 2>&1'];
22 elseif isunix
23 cmd = ['java -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'" > /dev/null 2>&1'];
24 else
25 cmd = ['java -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'" > /dev/null 2>&1'];
26 end
27else
28 % Allow output in DEBUG mode
29 cmd = ['java -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'"'];
30end
31
32[status] = system(cmd);
33if status > 0
34 if suppressOutput
35 if ispc
36 cmd = ['java --illegal-access=permit -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'" > nul 2>&1'];
37 else
38 cmd = ['java --illegal-access=permit -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'" > /dev/null 2>&1'];
39 end
40 else
41 cmd = ['java --illegal-access=permit -cp "',jmtGetPath,filesep,'JMT.jar" jmt.commandline.Jmt jsimw "',filename,'"'];
42 end
43 [status] = system(cmd);
44 if status > 0
45 rt = java.lang.Runtime.getRuntime();
46 rt.exec(cmd);
47 end
48end
49end