The
xmcImportFunctionSettings
command
sets options for the import function feature in Model Composer. Options are specified in
the form of name/value pairs. The current options include:-
build
: Specifies the build environment for Model Composer. Supported values include:-
release
: the default build mode. Generates the specified output, and lets you perform simulation. -
debug
: Provides integration into a third-party compiler to let you step through and observe the imported C/C++ function using standard debug features.
-
-
compiler
: Specifies the third-party compiler to use for debugging purposes. The supported values are:-
default
: Compile with GCC or MinGW compiler for debugging using GDB debugger. Note that GCC or MinGW, and GDB are included with the standard installation of Model Composer. -
Visual Studio
: Compile and debug C/C++ code with Visual Studio.
-
-
blocks
: Specifies the specific block or blocks that you want to observe during the debugging process. If the option is not specified, all imported function blocks in the current design are included for debugging. You can specify one or more blocks using the following command form:
You can also unset the selection of the blocks using the following command:xmcImportFunctionSettings('blocks', {'block1','block2', ...})
xmcImportFunctionSettings('blocks', {})
You can use the MATLABgcb
command to get the block path for a specific block. The blocks must be specified as a list of blocks, even if only one block is specified. For example:xmcImportFunctionSettings('blocks', {'xmc_optical_flow/Lucas-Kanade'})
-
Visual Studio Location
: Specify the path to the Visual Studio tool. By default, Model Composer will automatically look for Visual Studio in some standard locations. You can use this option to specify the location of the tool in cases where your installation may not be standard. -
vcvars
: Specifies the location of the vcvarsall.bat file used to configure the Visual Studio environment for command-line processing. This option can be used to point to the vcvarsall.bat file when theVisual Studio Location
option specifies a non-standard location for the tool.
Tip: The settings specified by
xmcImportFunctionSettings
remain set until you exit
Model Composer, or change the options using xmcImportFunctionSettings
.Note: In earlier versions of Model Composer, there existed a set of Computer
Vision libraries which are removed from 2020.2 release. You can import these functions
into Model Composer as a block using the
xmcImportFunction
feature. To
do this, you need to write a wrapper file around the library function. Refer to the
Model Composer examples, Sobel Edge detection and Color Detection, to understand how to
write a wrapper file and import it as a block into the Model Composer design.For
example: Type, xmcOpenExample('color_detection')
in the MATLAB command window. You can get the latest
version of Vision libraries from this Github repository.