how do i change the data file's directory for a simscape model?

12 visualizaciones (últimos 30 días)
Orel Levy
Orel Levy el 14 de Nov. de 2017
Comentada: Mitchell Lee el 21 de Abr. de 2022
I've created a simscape model from a solidworks model. As part of the process, it created me a DataFile.m with all the sizes for the model. If i try to move the file itself to a different directory, the model won't build. Anyone knows how can I change the directory the simscape model reads, from the simscape itself?

Respuestas (1)

Murali Karnam
Murali Karnam el 29 de Oct. de 2019
In a default setting, this file is generated with a static path. Once you generate the model, you can modify it by right-clicking anywhere in the model and:
Find Referenced Variables -> select your model in the left hand pane -> select the Model Workspace in the middle pane -> modity the file name which has the path also included in it.
I removed the path only kept the file name, and it worked for me even if the whole folder is moved to another location.
  1 comentario
Mitchell Lee
Mitchell Lee el 21 de Abr. de 2022
I did pretty much this and it worked.
Find referenced variables > Simulink root > ModelName > Model Workspace
On the right, browse for a new directory, change the directory and then you can copy and paste the files into the new directory. It might give you a warning about shadowing so once you see it working just delete the old directory

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Environment Customization en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by