What problem does it solve?
This skill helps authors create reusable, idempotent MATLAB scripts to build System Composer architecture models using the architecture-modeling API.
Core Features & Use Cases
- Create System Composer models programmatically using the architecture-modeling API: systemcomposer.createModel, addComponent, addPort, connect, setInterface, and manage interface dictionaries (.sldd) with addInterface/addElement.
- Apply profiles and stereotypes via Profile.createProfile and addStereotype, and handle allocation sets with systemcomposer.allocation.createAllocationSet.
- Debug and guard against common API failures (unresolved interfaces, profile save errors, allocation-signature mismatches) and enforce idempotent rebuilds.
- Ensure reliable layout by calling Simulink.BlockDiagram.arrangeSystem before saving, and keep edits deterministic by rebuilding from scratch rather than ad-hoc edits.
Quick Start
Create a buildMySystemModel.m that uses the architecture-modeling APIs (systemcomposer.createModel, addComponent, addPort, connect, setInterface, createDictionary) and call arrangeSystem before saving to ensure idempotent, reproducible results.