Bus Element In parameter name for "Description" inside of element attributes (not inside of block properties)
1 次查看(过去 30 天)
显示 更早的评论
A bus element In block has two fields called "Description"
I am trying to programatically change the name of both Descriptions using an excel sheet.
The parameter "Description" only changes 1 of the fields inside the block.
However, I cannot find the ObjectParameter name for the other "Description" property inside of the bus element attribute window (See screenshot)
Does anyone know the name of this parameter?
0 个评论
回答(1 个)
Ayush
2023-8-23
It is my understanding that you are not able to programmatically change the signal1 attributes of your Bus Element In block. You would like to know how you would be able to change the particular parameter (indicated in the attached screenshot) using your excel sheet.
A possible solution for the above question can be to use the set_param function to access and change the value of the parameter. You must specify the block object along with the signal in case of a Bus Element In block in order to change its parameter in the set_param function. The following example will illustrate on how to achieve the above:
% Assuming model name to be “Model1”
% Load the model in memory
load_system('Model1')
% Change the block parameter using set_param
set_param('Model1/InBus.signal1','Description','Your value')
% Save the model in memory
save_system('Model1')
Please refer to set_param documentation for more information on how to set Simulink parameter values.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!