how do i change the data file's directory for a simscape model?
8 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Murali Karnam
2019-10-29
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 个评论
Mitchell Lee
2022-4-21
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!