Create protected mirror of library of Simscape files
ssc_mirror command lets you protect and build a whole package of
Simscape™ files in one step.
a protected mirror of a package of Simscape files in a specified
mirrordir, and also optionally
builds a custom library from these files.
The first argument,
be a top-level package name.
The package directory name begins with a leading
whereas the argument to
ssc_mirror must omit the
The second argument,
mirrordir, is the directory where the
protected package is placed. The
ssc_mirror command creates this
directory, if it does not exist, recreates the whole package structure under it,
generates the protected files, and places them in the appropriate mirror
buildmirror flag is set to
ssc_mirror command also builds a custom Simscape library file, named
, containing all the
sublibraries and blocks generated from the Simscape files in the mirrored package (similar to the
ssc_build command), and places the
file in the
mirrordir directory. The
flag is optional and the default is
false, that is, by default the
package is mirrored and protected but the library is not built.
For more information, see Using Source Protection for Simscape Files.
For example, your top-level package directory, where you store
your Simscape files, is named
To protect, mirror, and generate a custom block library from this
package in the directory
C:\Work\deploy, at the MATLAB® Command
ssc_mirror SimscapeCustomBlocks C:\Work\deploy true;
This command creates a mirror package, equivalent to the
but consisting of Simscape protected files, in the directory
and generates a file called