Main Content

ssc_mirror

(To be removed) Create protected mirror of library of Simscape files

ssc_mirror will be removed in a future release. Use sscmirror instead. (since R2024b) Syntax and arguments of the two functions are identical.

Syntax

ssc_mirror namespace mirrordir buildmirror

Description

The ssc_mirror command lets you protect and build a whole namespace of Simscape™ files in one step.

ssc_mirror namespace mirrordir buildmirror creates a protected mirror of a namespace of Simscape files in a specified folder mirrordir, and also optionally builds a custom library from these files.

The first argument, namespace, must be a top-level namespace name.

Note

The namespace folder name begins with a leading + character, whereas the argument to ssc_mirror must omit the + character.

The second argument, mirrordir, is the folder where the protected namespace is placed. The ssc_mirror command creates this folder, if it does not exist, recreates the whole namespace structure under it, generates the protected files, and places them in the appropriate mirror locations.

If the buildmirror flag is set to true, the ssc_mirror command also builds a custom Simscape library file, named namespace_lib, containing all the sublibraries and blocks generated from the Simscape files in the mirrored namespace (similar to the ssc_build command), and places the namespace_lib file in the mirrordir folder. The buildmirror flag is optional and the default is false, that is, by default the namespace is mirrored and protected but the library is not built.

For more information, see Using Source Protection for Simscape Files.

Examples

For example, your top-level namespace folder, where you store your Simscape files, is named +SimscapeCustomBlocks. To protect, mirror, and generate a custom block library from this namespace in the folder C:\Work\deploy, at the MATLAB® Command prompt, type:

ssc_mirror SimscapeCustomBlocks C:\Work\deploy true;

This command creates a mirror namespace, equivalent to the +SimscapeCustomBlocks namespace but consisting of Simscape protected files, in the folder C:\Work\deploy, and generates a file called SimscapeCustomBlocks_lib in the C:\Work\deploy folder.

Version History

Introduced in R2009a

expand all

See Also