MATLAB 帮助中心
列出当前工程的引用层次结构中的所有工程
自 R2021a 起
allreferences = listAllProjectReferences(proj)
allreferences = listAllProjectReferences(proj) 返回指定工程的引用层次结构中所有工程的列表。
allreferences
proj
示例
全部折叠
使用 currentProject 从当前加载的工程创建一个工程对象。
currentProject
openProject("C:/projects/myproject/"); proj = currentProject;
获取加载的工程层次结构中的所有工程。
allreferences = 1×2 ProjectReference array with properties: Project File StoredLocation Type
查询第一个引用工程。
allreferences(1)
ans = ProjectReference with properties: Project: [1×1 matlab.project.Project] File: "C:\projects\myproject\referencedproject1" StoredLocation: "../referencedproject1" Type: "Relative"
matlab.project.Project
工程,指定为 matlab.project.Project 对象。使用 currentProject 从当前加载的工程创建一个工程对象。
ProjectReference
所有引用工程,以 ProjectReference 对象数组形式返回。
在 R2021a 中推出
currentProject | openProject
openProject
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处