Change "Project definition folder"

15 次查看(过去 30 天)
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?

回答(1 个)

Aman
Aman 2023-8-4
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 个评论
Scott Tatum
Scott Tatum 2023-8-7
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by