How to control legacy_code generated file placement?

1 回表示 (過去 30 日間)
Gergely 2015 年 12 月 11 日
回答済み: Vidya Viswanathan 2015 年 12 月 24 日
Usual Simulink.fileGenControl 'CodeGenFolder' setting does not influence the path where the files are generated when calling:
legacy_code('sfcn_cmex_generate', def);
legacy_code('compile', def);
I could only achieve to modify the path by changing the cwd in the script, but that seems ugly. Is there a proper way?


Vidya Viswanathan
Vidya Viswanathan 2015 年 12 月 24 日
The functionality to directly control the build path for Legacy Code Tool is currently unavailable with MATLAB. As a workaround, you can navigate into the desired folder, generate the files there and navigate out. This is a manual approach. Alternately, you could use scripting to achieve the same. I cannot think of a simpler workaround.

その他の回答 (0 件)


Help Center および File ExchangeSimulink Environment Customization についてさらに検索



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by