MATLAB: Does Real-Time Workshop 7.6 (R2010b) generate a build folder with a different name than the subsystem when I press the button “Build Subsystem”

buildfilefolderindexnamertwsimulink codersourcesubsystemsubsystem_ert_rtw

I have a Subsystem with the name Subsystem. When I press the button "Build Subsystem" Real-Time Workshop generates a folder with the name Subsystem0_ert_rtw. I'd expect the name to be Subsystem_ert_rtw.

Best Answer

During the code generation process Real-Time Workshop generates a temporary model. If a model exists with the same name there may be naming conflicts. Therefore Real-Time Workshop makes a check for other models with the same name. If one is found it adds an index to the end of the name.
Use the following commands to check if there is a naming conflict with your subsystem name:
exist('Subsystem')
which('Subsystem')