How can I create an app that manipulates simulink files without needing to copy the app into every project I use it for?
1 次查看(过去 30 天)
显示 更早的评论
I'm using Simscape Multibody, and I've been working on an app that allows me to quickly set up the basic blocks I need on top of the imported data from Solidworks. The problem is, every time I want to use the app for a project, I have to copy the app and all its associated objects and sub-apps into the folder of the Solidworks exports. If I don't do this, the app's designated folder becomes the go-to location for autosaves etc.
Is there a way to set the default save location to be the same folder as the one the XML and STEP files? I use uiget to allow the user to select the folder, but that only seems to work for incoming data, not documents being saved.
0 个评论
回答(1 个)
Steve Miller
2021-6-6
Hi Isaac,
> the app's designated folder becomes the go-to location for autosaves etc
MATLAB has preference settings for autosaves, but I would expect that if you navigate to the folder where you are editing the files, the autosaves would be placed there. That would simply mean the folder containing your MATLAB App needs to be on the path, and any code it calls should not force the MATLAB to change its working directory. You could make the working directory a parameter in the App if you want the user to be able to explictly define it and change it during the session.
--Steve
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simscape Multibody 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!