Filter löschen
Filter löschen

Get invalid Simulink block parameter setting programmatically

4 Ansichten (letzte 30 Tage)
giga
giga am 1 Feb. 2016
Bearbeitet: giga am 1 Feb. 2016
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!

Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by