How to move library subsystems between user libraries in R2012b ?
8 次查看(过去 30 天)
显示 更早的评论
In older versions of Simulink, I could move a library subsystem from one user library to another with a "cut" from the first library, and a "paste" into the new library.
In these versions, the "cut" operation was sufficient to prevent the subsequent paste from being done as a library link.
If I attempt this same operation in R2012b, it always attempts the "paste" as a library link; so the subsystem briefly appears as a link, then turns into an invalid library link when the original library update is propagated.
Questions:
- Is there a simple way to perform this same library subsystem "move" operation in R2012b ?
- Or, does moving a subsystem between libraries now need to be done programmatically with some library LinkStatus hijinks ?
- Or, am I just missing something obvious here ?
Notes:
- I am using Xilinx SysGen, which does not support Model References; so I am using user library subsystems for design reuse and unit test
- as part of library maintenance, I need to occasionally move stuff into a new library
2 个评论
Ryan G
2013-5-22
The thing is, when you cut a block out of a library, it is no longer part of the library. Have you tried using copy/paste instead? It sounds like in older versions the library simply wasn't updated the same way as it is in 12b.
采纳的回答
John Barber
2013-5-23
One way is to do the following:
1) Copy the subsystem and paste into the new library - it will paste as a link as you have stated.
2) Click on the link icon in the lower left corner, in the context menu click 'Disable Library Link'
3) Click again on the link icon, then select 'Break Library Link'
As far as I know, you have to disable the link, then break it as two separate steps. You could also check the documentation - I think there is a 'LinkStatus' parameter that you can access via get_param() and set_param() that might let you do it programmatically.
Also, be sure to try out the 'Forwarding Table' functionality if you haven't already (I'm not sure when it was added, but it is in R2012b). In a library, you can create forwarding table entries in the form of (old block path),(new block path) pairs, and when you open a model with instances of the old block, they will automatically be updated to use the new path. The new path can be to a different library, as well.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!