How to retrieve the Inport names/labels of a Stateflow chart?
Show older comments
Hello, I am looking for a way to programatically retrieve the portnames of a stateflow chart.
Curiously get_param(gcb,'OutputSignalNames') returns a cell array of strings with the names of all outports of the chart. However get_param(gcb,'InputSignalNames') returns an empty cell. I tried several other parameters, aswell as analyzing the PortHandles of the chart directly, but without success.
Why does 'InputSignalNames' return a blank cell? Are there certain prerequisites for this parameter to work as expected? Are there alternative parameters?
Is there a possible workaround? E.g. is there an API for the model explorer which would allow me to parse the chart data for variables with "Scope" -> "Input"?
Thank you in advance!
Accepted Answer
More Answers (1)
Federico
on 14 Feb 2023
0 votes
'InputSignalNames' contains informations of names on lines connecting inports
1 Comment
Anubhav Routray
on 20 Apr 2023
Yes. You are absolutely correct. Is there any workaround how to get the signal names if the names are not written on the lines connecting the ports.? Appreciate your help
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!