Duplicate model within a project

2 views (last 30 days)
Natalia Riva
Natalia Riva on 21 Apr 2023
Commented: Priya Moorthy on 5 May 2023
Dear all,
I have a model developed with Simbiology Model Builder 6.4 using Matlab 2022b. Due to some constrains, we need to go down to Matlab 2020b (Simbiology Model Builder v6.0). I would like to duplicate the model within the project to continue with the development, but apparently that option is no longer available from the project window.
Any idea on how I could duplicate my model now?
Thanks a lot for your support,
Best,
Natalia

Answers (1)

Jeremy Huard
Jeremy Huard on 21 Apr 2023
Edited: Jeremy Huard on 21 Apr 2023
Hi Natalia,
the 'Duplicate model' option in the conctext menu of the project view is indeed not yet available in R2020b.
However, you can achieve it as follows:
  • save your project in a .sbproj file
  • keep the project open in Model Builder or load it if you have already closed it
  • In the toolstrip menu of Model Builder, choose 'Model' 'Load Model from file', select your sbproj file
  • Choose the model to duplicate in the model list. SimBiology will add the model to your project after adding '_1' to the name since a model with the same name already exists in the project
Best regards,
Jérémy
  3 Comments
Jeremy Huard
Jeremy Huard on 21 Apr 2023
Hi Natalia,
glad it worked!
For completeness, I would like to remind you that SimBiology is not forward-compatible.
Which means that projects created in a newer might not load correctly in an older version. The same applies when importing models only from newer projects if the model created in the newer version contains components that didn't exist in the oder version (for example Observables).
It could work just fine but I recommend to check that everyting is fine.
So, to create your 20a project I recommend to import models from the newer project with the method I described above.
Best regards,
Jérémy
Priya Moorthy
Priya Moorthy on 5 May 2023
Hi, Natalia,
Just to follow up on Jérémy's reply:
SimBiology projects do not support forward incompatibility, and there is a bug in the current version of the apps that may allow you to loading projects saved in a later version of our app without receiving any warning or error message. In this case, you may end up with an inconsistent project format that could cause unexpected behavior or data loss down the line, even if the project appears to load correctly, so we caution you against trying to load 22b projects in 20b.
You can export just the models from the app to the command line in R2022b, save them to a mat file and load them in earlier releases of MATLAB through 19b.
Priya

Sign in to comment.

Communities

More Answers in the  SimBiology Community

Categories

Find more on Extend Modeling Environment in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!