1

I'm automating my build process, but I wasn't able to change the model_target_rtw folder to something different.

I'm not talking about CodegenFolder, but about the folder that's created inside it during compilation.

I'm currently working this around by renaming the folder after compilation, but it would be grate to remove that step.

xvan
  • 4,554
  • 1
  • 22
  • 37

1 Answers1

0

The folder you are referring to is the RTW (Real Time Workshop) BuildDirectory.

You can get the value of BuildDirectory by running the command:

RTW.getBuildDir('MyModel')

See: https://se.mathworks.com/matlabcentral/answers/274082-how-can-i-change-the-build-folder-of-a-model

Also look at this question: Save generated code in a special folder in "rtwbuild"

If you run this command in MATLAB:

set_param(0, 'CodeGenFolder', 'C:\MyBuildDir')

and then run the RTW.getBuildDir command again you will see that the BuildDirectory has changed.

Community
  • 1
  • 1
Nils Lande
  • 860
  • 9
  • 14