Extract a Folder to Create a Referenced Project

In a Project, you can partition a large project into components through the use of project references.

Consider the Airframe example project. Suppose you create a folder Trial and carry out development work within the folder. You produce:

  • Shortcuts to a Simulink® library, a MATLAB® file, and a Readme document

  • Design and source code folders

  • Data files

For easier management, you want to convert the Trial folder into a separate component. In addition, you want access to the folder contents, for example, shortcuts to key files. To fulfill these requirements, extract the folder from the project and convert the folder into a referenced project.

  1. In the Files view, right-click the Trial folder and select Extract to Referenced Project.

  2. In the Extract Folder to New Project dialog box, specify these options:

    • New Project Name — For example, DataLogging.

    • New Project Location – For example, C:\Work\DataLogging.

    • Reference type – The default is Relative reference. Use the default if you specify the new project location with reference to the current project root. If you specify the full path for the new location, which is, for example, on a network drive, select Absolute reference.

  3. Click More Options. If you want to disable any of the default content migration actions, clear the corresponding check box.

  4. Click Extract.

  5. In the two Warning dialog boxes that open, click OK.

The folder Trial and its contents are removed from the project. On the Project Shortcuts tab, the Referenced Projects section displays a new DataLogging button.

Related Topics