How to move library subsystems between user libraries in R2012b ?

조회 수: 8 (최근 30일)
Brian
Brian 2013년 5월 20일
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
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.
Brian
Brian 2013년 5월 23일
편집: Brian 2013년 5월 23일
> Have you tried using copy/paste instead?
That would produce a link rather than a move. John's answer below describes how to disable/break a link to make a standalone copy in the new library.

댓글을 달려면 로그인하십시오.

채택된 답변

John Barber
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.
  댓글 수: 1
Brian
Brian 2013년 5월 23일
편집: Brian 2013년 5월 23일
John, thanks!
So the following four-step boogie produces the same results as the old library cut/paste: copy_subsystem->disable_link->break_link->delete_old_library_subsystem
I also opened a support ticket on this; right-mouse-drag to the new library will produce a menu with "paste and break link", which saves a couple steps.
Mathworks support indicated this is a known issue, and should be fixed at some point.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by