MATLAB: Is the “matlabroo​t\rtw\c\to​rnado\devi​ces” directory automatically added to the MATLAB path if I open the vxlib1 library in Real-Time Workshop 7.4 (R2009b)

simulink coder

When I open the vxlib1 library, the "matlabroot\rtw\c\tornado\devices" directory is automatically added to MATLAB path. I can't understand why this path is not yet part of the default path.

Best Answer

To properly include all functionalities the path is automatically added when opening the library or a model that contains blocks from the vxlib1 library.
The addpath command is issued in mask initialization commands of the "Async Interrupt" and "Task Sync" blocks. If you right click on these blocks and select view mask you will see the following code in the Initialization tab:
devicedir = fullfile(matlabroot,'rtw','c','tornado','devices');
if isempty(findstr(devicedir, path))
addpath(devicedir);
end