How do I ensure shared code generated from top-level model or just model reference is in the same location and layout?

I am trying to make sure that shared code that is generated for my top-level model has the same names and file locations when I generate code for just one of the model references. Is there a setting that I can use to achieve it?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 10 月 13 日
編集済み: MathWorks Support Team 2022 年 10 月 13 日
Yes, there is a specific setting that will allow you to do this.
When generating code from the reference model only:
1. Open the Configuration Parameters
2. Search for "Shared Code Placement"
3. Click on it and change the option to "Shared location"
4. Generate code
Now you should see the same shared utilities code as when building the top-level model. For reference, here is the documentation that specifies the setting:

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品

リリース

R2018b

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by