How to work with Simulink project and libraries?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
We have a folder structure like: C:\Project1 C:\Project2 C:\CommonLib
We would like to have the CommonLib files to be part of each project, to be able to integrate those common files to SVN. So a change of a CommonLib file by a developer working on Project1 will be propagated for another developer working on Project2. When I try to add the CommonLib files to the Simulink Project1, I get the error message that the file in not in the root directory of the project.
I wonder then how to handle common libraries within project. Can someone please help me to understand that?
Thanks
0 comentarios
Respuestas (2)
C.J. Harris
el 9 de Mayo de 2012
You can handle the common libraries within SVN using the 'externals' definition for both projects, this way you could ensure they were always added to your project root directory on checkout.
If they are not within your project root directory on checkout you would have to add the folder to your MATLAB path. This could either be done temporarily by your setup scripts, or permanently by added the CommonLib folder to your MATLAB path.
Gavin Walker
el 20 de Jun. de 2012
There are a number of different workflows that might work here. Something that influences the choice of workflow is "how often do the libraries in CommonLib get updated?"
If the answer is that CommonLib is updated infrequently, then it might be possible to treat CommonLib like a toolbox or blockset. You can use a project start up shortcut to add the network location of CommonLib to the MATLAB path (and have a shutdown shortcut to remove it). When it is discovered as a dependent file or files of the project then it can be marked as an "external dependency" to show that it is expected for it not to be part of the current project.
CommonLib itself might well be in its own Simulink Project that is opened when development work is needed on CommonLib. If a user of Project1 has made changes to CommonLib then they can open the CommonLib Simulink Project, check for modified files, run the tests and validation procedures that are specific to the CommonLib Simulink Project and, once all changes are tested & reviewed, submit. Other users of CommonLib will get these changes the next time they update their CommonLib project.
There are a lot of variants on these workflows, such as SVN externals as described by Chris.
0 comentarios
Ver también
Categorías
Más información sobre Dependency Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!