How can I place the generated code in different customised folders during code generation for two referenced models during the code generation for the entire model ?
9 次查看(过去 30 天)
显示 更早的评论
I have created a model consisting of two referenced model through the model block. However during the code generation for the entire model, the code for the referenced models are placed in the slprj folder. I want to place the code for the referenced models in two different folders at two different locations. How can this be done ?
0 个评论
回答(1 个)
Divyanshu
2025-1-17
I am not sure if it is possible to place generated code for referenced models at different locations, probably you can try using 'Shared code placement' parameter, you can specify the location where you want to place the generated code for a model. The path to the parameter is:
'Configuration Parameters > Code Generation > Interface > Shared code placement'.
You can execute the following command to get more details on this parameter:
>>web(fullfile(docroot,"rtw/ref/sharedcodeplacement.html"))
However, if this doesn't work for referenced models, then you might have to use 'subsystem' blocks instead of 'Model references' to keep the generated code for the entire model at a specified custom location. Please executed the following command to open documentation on 'subsystem' blocks:
>>web(fullfile(docroot,"simulink/slref/subsystem.html"))
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!