ssc_build
Build custom library from collection of Simscape files
Description
ssc_build(
generates a custom
Simscape™ library file from the specified package, package
)package
. Call
ssc_build
from the package parent directory, that is, from the
directory containing the top-level package directory. For more information on package
directory structure, see Organizing Your Simscape Files.
When you call ssc_build
with one argument, the library file is
named
and is located in the
package parent directory. The library contains 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 newer than the protected files, package
_libssc_build
uses the
protected files to build the library, but issues a warning.
ssc_build(
generates a custom Simscape library file from the specified package, package
,'-output',outputlibrary
)package
, with
outputlibrary
defining the library file name and location. This
syntax uses a name-value argument pair, where '-output'
is the name of
the optional argument and outputlibrary
is the argument value. The
function implements partial argument name matching, therefore specifying
'-o'
as the argument name also works.
ssc_build
is the command form of the
syntax. Command form requires fewer special characters. You do not need to type parentheses
or enclose the input in single or double quotes. Separate inputs with spaces instead of
commas. package
For example, to build a package named +MyPackage
, these statements
are
equivalent:
ssc_build MyPackage % command form ssc_build('MyPackage') % function form
You can also use command form with the name-value argument pair, described in the
previous syntax, as long as the path and name of the output library is a character vector.
For example, to build a package named +MyPackage
and save the output
library as 'C:\Work\MyLibrary'
, these statements are
equivalent:
ssc_build MyPackage -output C:\Work\MyLibrary % command form ssc_build('MyPackage','-output','C:\Work\MyLibrary') % function form
Do not use command form when outputlibrary
uses variables, or
functions like fullfile
, to specify the output library name and
location. For more information on the command-function duality, see Choose Command Syntax or Function Syntax.
ssc_build
is a special syntax, with no arguments, that you can use
to call the function from inside the package directory structure. It builds a library from
the current package, with default library name and location. To specify a different name or
location for the output library, call ssc_build
from the package parent
directory using either the command or the function form of the syntax with the name-value
argument pair.
Examples
Input Arguments
Version History
Introduced in R2008b
See Also
addpath
| genpath
| fullfile
| sl_postprocess
| ssc_clean
| ssc_mirror
| ssc_protect