Change "Project definition folder"

11 views (last 30 days)
Scott Tatum
Scott Tatum on 20 Jul 2023
Commented: Scott Tatum on 7 Aug 2023
In 2022b, is there a way to create a project with a specific definition folder type? I have my preferences set to ".SimulinkProject", but someone else had it as "resources/project" and we're running into issues. I'd also like to configure the Project definition files as well
I would like to either be able to do a temporary setting using the settings command,
s = settings;
s.xyz.projectDefinitionFolder.TemporaryValue = '.SimulinkProject';
s.xyz.projectDefinitionFiles.TemporaryValue = matlab.project.DefinitionFiles.SingleFile;
but I cannot find this folder option in the settings structure.
Or, some option when creating the project such as
proj = matlab.project.createProject("Name","myprojectname","Folder","C:\work\mynewproject",...
"ProjectDefinitionFolder",".SimulinkProject","ProjectDefinitionFile",matlab.project.DefinitionFiles.SingleFile)
Any way to do this?

Answers (1)

Aman
Aman on 4 Aug 2023
Hi,
I understand that you want to create projects and want to set specific definition folder types programmatically, but you are running into issues while doing it.
The "settings" is used to access the "SettingGroup" of the root object, and the "SettingGroup" does not have any inbuilt function for setting up the project definition folder. Please refer to the following documentation to learn more about the "settings".
The "createProject" function is used to create a blank project. It accepts a name-value pair as an input argument, but the pair could only be "Folder" and "Name", It does not support "ProjectDefinitionFolder" and "Name" as a pair, which is what you are trying to do. Please refer to the following documentation to learn more about the "createProject" function.
Alternatively, you can create a project using the MATLAB IDE. While creating the project, the folder you select as the project folder will act as the project definition folder. Please refer to the following documentation to learn more about the project creation using the MATLAB Ide.
I hope it helps!
  1 Comment
Scott Tatum
Scott Tatum on 7 Aug 2023
Thanks for the reply. I am aware of the help on the items and know the features I asked for do not currently exist, they would be a great enhancement.
Is there any other workaround to get a consistent method for the project definition folder other than telling all users they have to set that setting in that way manually? This makes it impossible to configuration control a process if a user can just switch the project definition locally.

Sign in to comment.

Categories

Find more on MATLAB Code Analysis in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!