Build custom library from collection of Simscape files


ssc_build package


ssc_build package generates a custom Simscape™ library file, named package_lib, containing all the sublibraries and blocks generated from the Simscape files (either source or protected) located in the package and its subdirectories. Simscape protected files have higher precedence than the source files when you build a library. If both the protected and the source files are present in the package, and the source files are out of date, ssc_build will use the protected files to build the library, but you will get a warning.

The argument, package, must be a top-level package name.


The package directory name begins with a leading + character, whereas the argument to ssc_build must omit the + character.

The package must be located in a directory on the MATLAB® path. The package_lib is automatically placed in the package parent directory. For more information, see Building Custom Block Libraries.

If you run the ssc_build command from inside the package directory structure, you can omit the argument.


For example, your top-level package directory, where you store your Simscape files, is named +SimscapeCustomBlocks. To generate a custom block library, at the MATLAB Command prompt, type:

ssc_build SimscapeCustomBlocks;

This command generates a Simulink® model file called SimscapeCustomBlocks_lib in the parent directory of the top-level package (that is, in the same directory that contains your +SimscapeCustomBlocks package).

Introduced in R2008b