Azzera filtri
Azzera filtri

Get invalid Simulink block parameter setting programmatically

4 visualizzazioni (ultimi 30 giorni)
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!

Risposte (0)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by