필터 지우기
필터 지우기

Sharing a file between multiple projects

조회 수: 7 (최근 30일)
Heine Hørup Pedersen
Heine Hørup Pedersen 2023년 12월 6일
댓글: Heine Hørup Pedersen 2023년 12월 21일
Im trying to get into the Projects but I struggle to figure out how to share a single file between multiple projects.
Lets say I have a two projects, one for App1 and another for App2
Both projects uses the same file named filereader. How do I add this file to both projects?
I have tried to add it using Project Path, but the path must be in the project root folder. If I drag/drop the file into the project it will be moved to the project folder.
One solution would be to create a 3rd project Shared that can be added as a reference in both projects. But I'm not fully convinced this is the way to go.
Best Regards
Heine

채택된 답변

prabhat kumar sharma
prabhat kumar sharma 2023년 12월 14일
Hi Heine,
I understand that you are looking for a way by which you can use a single file in your multiple MATLAB project.
I am considering that you have the file inside the app2 only and to access that file in app 1.
So you can do the following:
  1. Setup your project 1 (“app1”)
  2. Setup your project 2 (app2)
  3. Add your project 2 as a referenced project in your project 1.
You’ll get an o0ption to add references in the views column of your project.
So, when you’ll be loading the project 1 , then MATLAB will first automatically load the references and then your project will be getting loaded. So that’s how you can use the functionalities you have in your project 2.
I hope it helps.
  댓글 수: 1
Heine Hørup Pedersen
Heine Hørup Pedersen 2023년 12월 21일
Thank you for answering prabhat.
Since project1 and project2 might become large projects, I dont really want to include the full project in the other. I might go with the solution where the filereader itself (or a small group of files) will be a 3rd project. Then reference that 3rd project in the two others. This seems to be the only way to do it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by