필터 지우기
필터 지우기

How to update the build action of a model programmatically?

조회 수: 2 (최근 30일)
Ayush
Ayush 2023년 7월 6일
답변: Sanskar 2023년 7월 6일
I want to update the build action of a model from 'build, load and run' to 'build' only programmatically? Any way I can do that?

답변 (1개)

Sanskar
Sanskar 2023년 7월 6일
Hi Ayush!
To load the system model and configure the build action in MATLAB Simulink, you can follow these steps:
Start by loading the system model using the "model" variable. Retrieve the active configuration set of the loaded model using the "getActiveConfigSet" function and assign it to the "ConfSet" variable. Access the 'Coder Target' component of the configuration set using the "getComponent" method, and set its 'BuildAction' property to 'Build'.
load_system(model);
ConfSet = getActiveConfigSet(model);
ConfSet.getComponent('Coder Target').CoderTargetData.Runtime.BuildAction = 'Build';
By executing these commands, you have loaded the system model and configured the build action for the Coder Target component. Now, you should be able to proceed with building the system as desired.
Hope it helps!

카테고리

Help CenterFile Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by