listAllProjectReferences
说明
返回指定工程的引用层次结构中所有工程的列表。allreferences
= listAllProjectReferences(proj
)
示例
查找所有引用工程
使用 currentProject
从当前加载的工程创建一个工程对象。
openProject("C:/projects/myproject/");
proj = currentProject;
获取加载的工程层次结构中的所有工程。
allreferences = listAllProjectReferences(proj)
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"
输入参数
proj
— 工程
matlab.project.Project
对象
工程,指定为 matlab.project.Project
对象。使用 currentProject
从当前加载的工程创建一个工程对象。
输出参量
allreferences
— 所有引用工程
ProjectReference
对象数组
所有引用工程,以 ProjectReference
对象数组形式返回。
版本历史记录
在 R2021a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)