How can I create an app that manipulates simulink files without needing to copy the app into every project I use it for?

1 view (last 30 days)
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.

Answers (1)

Steve Miller
Steve Miller on 6 Jun 2021
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

Categories

Find more on Applications in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!