How to control legacy_code generated file placement?

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);
legacy_code('slblock_generate',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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

태그

질문:

2015년 12월 11일

답변:

2015년 12월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by