Managing Simulink Projects
MATLAB projects coordinate Simulink workflows — they manage the MATLAB path (which Simulink uses to resolve model references, data dictionaries, and requirements), track file membership for source control, and provide label-based automation for selecting targets in CI/CD pipelines.
When to Use
- Creating a new MATLAB project for Simulink models
- Adding models, data dictionaries, or requirements to an existing project
- Configuring project paths so Simulink can resolve references
- Setting up labels for automation (test selection, code generation targets)
- Configuring source control and cache folders
- Diagnosing broken model references, missing dictionaries, or failing project health checks
When NOT to Use
- Building or editing model structure (blocks, connections) → use
building-simulink-models
- Writing or running tests → use
testing-simulink-models
- Drafting requirements content → use
generate-requirement-drafts
- Running simulations for analysis → use
simulating-simulink-models
Mental Model
Four principles that prevent the most common failures:
Registration ≠ path. addFile registers a file with the project for source control tracking. addPath puts a folder on the MATLAB path so Simulink can resolve artifacts by filename. These are independent operations — you almost always need both.
Filename-only resolution. Data dictionaries (set_param(...,'DataDictionary',...), addDataSource), model references, and requirements all resolve via MATLAB path using filename only — never full paths. The containing folder must be on the project path.
addPath is not recursive. Each subfolder containing resolvable artifacts needs its own addPath call.
Single-project constraint. Only one project can be open at a time. Creating or opening a new project silently closes the current one (running its shutdown scripts). currentProject throws an error when no project is open — it does not return empty.
Guardrails
Always:
- Use
addPath(proj, folder) for every folder containing dictionaries, referenced models, requirements, or profiles
- Pass filename only (not full paths) to
addDataSource, set_param(...,'DataDictionary',...), and slreq.createLink
- Use absolute paths for
SimulinkCacheFolder and SimulinkCodeGenFolder: proj.SimulinkCacheFolder = fullfile(proj.RootFolder, 'work')
- Call
updateDependencies(proj) before querying proj.Dependencies
- Close the current project before creating or opening another
- Use
.graphml extension for DependencyCacheFile
- Use
.gitignore for excluding derived files from source control
- Add requirements folder to project path when linking requirements to models
- Register
.slmx link-store files with the project (guarded by isfile check)
Ask First:
- Deleting files from a project (
removeFile then disk delete)
- Modifying startup/shutdown scripts (affects all users who open the project)
- Changing project references (affects dependent projects)
Never:
- Use
proj.IgnoredFilePatterns — throws "Feature not supported" for all project types from createProject
- Use
cat.Labels — the correct property is cat.LabelDefinitions
- Use
'string' as a label DataType — valid types are 'none', 'char', 'double', 'integer', 'logical'
- Use
findFile (singular) for label queries in R2024a+ — use findFiles (plural). ONLY use findFile with R2023a/b
- Pass full file paths to filename-only APIs
- Attempt to open two projects simultaneously
- Use
clear all in startup scripts — it wipes the proj variable
Task Routing
| Intent |
Reference |
| Add files/folders to project, manage project path |
references/path-and-file-management.md |
| Set up labels for automation pipelines |
references/labels-and-automation.md |
| Link data dictionaries to models |
references/data-dictionaries.md |
| Configure model references across folders |
references/model-references.md |
Configure source control, cache folders, .gitignore |
references/source-control-and-caching.md |
| Configure startup/shutdown scripts |
references/path-and-file-management.md (Startup and Shutdown Scripts section) |
| Diagnose broken references or health check failures |
Start with Verification below, then route to the relevant reference |
Verification
Run after every project modification:
results = runChecks(proj);
updateDependencies(proj);
deps = proj.Dependencies; % digraph
If runChecks reports issues, inspect which folders are missing from the project path — this is the root cause of most failures.
Copyright 2026 The MathWorks, Inc.
1---2name: managing-simulink-projects3description: >-4 Manages MATLAB projects for Simulink workflows: path management, file registration, labels,5 source control configuration, and project lifecycle. Use when creating projects, adding6 models/dictionaries/requirements to projects, configuring labels for automation, fixing broken7 model references, or setting up source control for Simulink artifacts.8license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md9metadata:10 source: https://skillmd.com/skills/matlab/managing-simulink-projects11 author: MathWorks12 version: "1.1"13---1415# Managing Simulink Projects1617MATLAB projects coordinate Simulink workflows — they manage the MATLAB path (which Simulink uses to resolve model references, data dictionaries, and requirements), track file membership for source control, and provide label-based automation for selecting targets in CI/CD pipelines.1819## When to Use2021- Creating a new MATLAB project for Simulink models22- Adding models, data dictionaries, or requirements to an existing project23- Configuring project paths so Simulink can resolve references24- Setting up labels for automation (test selection, code generation targets)25- Configuring source control and cache folders26- Diagnosing broken model references, missing dictionaries, or failing project health checks2728## When NOT to Use2930- Building or editing model structure (blocks, connections) → use `building-simulink-models`31- Writing or running tests → use `testing-simulink-models`32- Drafting requirements content → use `generate-requirement-drafts`33- Running simulations for analysis → use `simulating-simulink-models`3435## Mental Model3637Four principles that prevent the most common failures:38391. **Registration ≠ path.** `addFile` registers a file with the project for source control tracking. `addPath` puts a folder on the MATLAB path so Simulink can resolve artifacts by filename. These are independent operations — you almost always need both.40412. **Filename-only resolution.** Data dictionaries (`set_param(...,'DataDictionary',...)`, `addDataSource`), model references, and requirements all resolve via MATLAB path using **filename only** — never full paths. The containing folder must be on the project path.42433. **`addPath` is not recursive.** Each subfolder containing resolvable artifacts needs its own `addPath` call.44454. **Single-project constraint.** Only one project can be open at a time. Creating or opening a new project silently closes the current one (running its shutdown scripts). `currentProject` throws an error when no project is open — it does not return empty.4647## Guardrails4849**Always:**50- Use `addPath(proj, folder)` for every folder containing dictionaries, referenced models, requirements, or profiles51- Pass filename only (not full paths) to `addDataSource`, `set_param(...,'DataDictionary',...)`, and `slreq.createLink`52- Use absolute paths for `SimulinkCacheFolder` and `SimulinkCodeGenFolder`: `proj.SimulinkCacheFolder = fullfile(proj.RootFolder, 'work')`53- Call `updateDependencies(proj)` before querying `proj.Dependencies`54- Close the current project before creating or opening another55- Use `.graphml` extension for `DependencyCacheFile`56- Use `.gitignore` for excluding derived files from source control57- Add requirements folder to project path when linking requirements to models58- Register `.slmx` link-store files with the project (guarded by `isfile` check)5960**Ask First:**61- Deleting files from a project (`removeFile` then disk delete)62- Modifying startup/shutdown scripts (affects all users who open the project)63- Changing project references (affects dependent projects)6465**Never:**66- Use `proj.IgnoredFilePatterns` — throws "Feature not supported" for all project types from `createProject`67- Use `cat.Labels` — the correct property is `cat.LabelDefinitions`68- Use `'string'` as a label DataType — valid types are `'none'`, `'char'`, `'double'`, `'integer'`, `'logical'`69- Use `findFile` (singular) for label queries in R2024a+ — use `findFiles` (plural). ONLY use `findFile` with R2023a/b70- Pass full file paths to filename-only APIs71- Attempt to open two projects simultaneously72- Use `clear all` in startup scripts — it wipes the `proj` variable7374## Task Routing7576| Intent | Reference |77|--------|-----------|78| Add files/folders to project, manage project path | `references/path-and-file-management.md` |79| Set up labels for automation pipelines | `references/labels-and-automation.md` |80| Link data dictionaries to models | `references/data-dictionaries.md` |81| Configure model references across folders | `references/model-references.md` |82| Configure source control, cache folders, `.gitignore` | `references/source-control-and-caching.md` |83| Configure startup/shutdown scripts | `references/path-and-file-management.md` (Startup and Shutdown Scripts section) |84| Diagnose broken references or health check failures | Start with Verification below, then route to the relevant reference |8586## Verification8788Run after every project modification:8990```matlab91results = runChecks(proj);92updateDependencies(proj);93deps = proj.Dependencies; % digraph94```9596If `runChecks` reports issues, inspect which folders are missing from the project path — this is the root cause of most failures.9798----99100Copyright 2026 The MathWorks, Inc.101102----