open_system(name)
open_system(handle)
open_system(file)
| Parameter | Description |
|---|---|
| name | a character vector: the name of a model already loaded in memory. |
| handle | a numeric handle to a model created by the programmatic API. |
| file | a character vector: the path to a .nflow model file, or to an .ssp (System Structure and Parameterization) archive. |
open_system opens the nflow editor on a model. A model already loaded in memory (by name or handle) is snapshotted to a file and opened; a .nflow file is opened directly.
When the argument is an .ssp archive, it is not a diagram: it is first imported with NFlow.sspImport (its component FMUs are extracted, wired by connector name, and written to a runnable .nflow model) and the resulting model is opened. This lets an SSP composition be opened in the editor in one step.
The editor works on the snapshot it was opened with; script-side mutations made while the window is open are not streamed live to it.
ssp = [modulepath('nflow_fmi', 'root'), '/examples/ControlledDrivetrain.ssp'];
open_system(ssp);
| Version | Description |
|---|---|
| 2.0.0 | open_system accepts an .ssp archive (imported then opened) |