How to move library subsystems between user libraries in R2012b ?

8 vues (au cours des 30 derniers jours)
Brian
Brian le 20 Mai 2013
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 commentaires
Ryan G
Ryan G le 22 Mai 2013
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 le 23 Mai 2013
Modifié(e) : Brian le 23 Mai 2013
> 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.

Connectez-vous pour commenter.

Réponse acceptée

John Barber
John Barber le 23 Mai 2013
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 commentaire
Brian
Brian le 23 Mai 2013
Modifié(e) : Brian le 23 Mai 2013
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by