Main Content

currentProject

현재 프로젝트 가져오기

설명

예제

proj = currentProject는 현재 열려 있는 프로젝트를 가져와, 프로젝트를 프로그래밍 방식으로 조작하는 데 사용할 수 있는 Project 객체 proj를 반환합니다. 현재 열려 있는 프로젝트가 참조된 프로젝트에 대한 바로 가기, 시작 파일 또는 종료 파일을 실행 중인 경우 currentProject는 참조된 프로젝트의 객체를 대신 반환합니다. 열려 있는 프로젝트가 없으면 MATLAB®은 오류를 표시합니다. 불러온 프로젝트가 있는지 프로그래밍 방식으로 확인하려면 matlab.project.rootProject를 사용하십시오. Check if Project Is Loaded 항목을 참조하십시오.

프로그래밍 방식으로 프로젝트를 다루는 것에 대한 자세한 내용은 프로그래밍 방식으로 프로젝트를 만들고 편집하기을 참조하십시오.

예제

모두 축소

Times Table App 프로젝트를 열고 명령줄에서 프로젝트를 조작하는 데 사용할 수 있는 Project 객체를 가져옵니다.

openExample("matlab/TimesTableProjectExample")
proj = currentProject
proj = 

  Project with properties:

                        Name: "Times Table App"
    SourceControlIntegration: "Git"
          RepositoryLocation: "C:\workSpace\examples\repositories\TimesTableApp"
       SourceControlMessages: [1×3 string]
                    ReadOnly: 0
                    TopLevel: 1
                Dependencies: [1×1 digraph]
                  Categories: [1×1 matlab.project.Category]
                       Files: [1×15 matlab.project.ProjectFile]
                   Shortcuts: [1×4 matlab.project.Shortcut]
                 ProjectPath: [1×3 matlab.project.PathFolder]
           ProjectReferences: [1×0 matlab.project.ProjectReference]
                StartupFiles: [1×0 string]
               ShutdownFiles: [1×0 string]
         DefinitionFilesType: FixedPathMultiFile
                 Description: "This example project contains the source code and tests for a simple educational app. ↵↵Use the "Project Shortcuts" toolstrip tab to find ways of getting started with this project."
                  RootFolder: "C:\workSpace\examples\TimesTableApp"
       SimulinkCodeGenFolder: ""
        ProjectStartupFolder: "C:\workSpace\examples\TimesTableApp"
         SimulinkCacheFolder: ""

출력 인수

모두 축소

프로젝트로, matlab.project.Project 객체로 반환됩니다. 현재 열려 있는 프로젝트를 프로그래밍 방식으로 조작하려면 matlab.project.Project를 사용하십시오.

버전 내역

R2019a에 개발됨