필터 지우기
필터 지우기

Get invalid Simulink block parameter setting programmatically

조회 수: 4 (최근 30일)
giga
giga 2016년 2월 1일
편집: giga 2016년 2월 1일
I've created a Simulink model programmatically and when I try simulating it, I get Simulink:Parameters:InvParamSetting exception. Catching the exception, I can get the handles of the blocks which has invalid parameter setting(s).
Can I programmatically find which parameter is causing the error? If I examine message property of the exception, I can get this string:
Invalid setting in 'sampleModel1/someblock' for parameter 'VariableName'.
I can parse the string above and find that VariableName is the culprit. However, will this method work in general for all types of blocks/parameters? I am looking for a more elegant way to find the parameter for which I need to specify a valid value.
Also if possible, what type of value the parameter excepts i.e. programmatically finding out data mentioned in this page: Block-specific Parameters . The Values column specify what type of value the parameter expects. Is there any way to find this data programmatically? (I have asked this in a separate question here.)
Thanks for your help!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by