How can we use find_system to get a block's SID
18 次查看(过去 30 天)
显示 更早的评论
In this page of the Matalb's documentation, it is said not to use the Simulink.ID.getSID() command and use find_system instead.
I have trouble understanding how to use find_system in order to replace this command.
I would also like to know why using Simulink.ID.getSID() is not recommanded.
Regards,
P Lepage.
0 个评论
采纳的回答
Fangjun Jiang
2020-9-29
It is true that find_system() is not the real replacement. If full block path is used in Simulink.ID.getSID() to get SID, then the replacement should be get_param(FullBlockPath, 'SID'). find_system might be used to find the block first.
Looking at the warning message in document for Simulink.ID.getSID, Simulink.ID.getHandle and Simulink.ID.hilite, I assume Mathworks is phasing out the Simulink.ID sub-class.
5 个评论
Fangjun Jiang
2020-9-29
When would the SID path (ModelName:SID) be used? If I know the SID number, I would do find_system(Model,'SID',###).
更多回答(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!